@Override
    public ApiVersionStatusBean getStatus(ApiVersionBean api, List<PolicySummaryBean> policies) {
        ApiVersionStatusBean status = new ApiVersionStatusBean();
        status.setStatus(api.getStatus());

        // Why are we not yet "Ready"?
        if (api.getStatus() == ApiStatus.Created || api.getStatus() == ApiStatus.Ready) {
            // 1. Implementation endpoint + endpoint type
            /////////////////////////////////////////////
            StatusItemBean item = new StatusItemBean();
            item.setId("endpoint"); //$NON-NLS-1$
            item.setName(Messages.i18n.format("EntityValidator.endpoint.name")); //$NON-NLS-1$
            item.setDone(true);
            if (api.getEndpoint() == null || api.getEndpoint().trim().isEmpty() || api.getEndpointType() == null) {
                item.setDone(false);
                item.setRemediation(Messages.i18n.format("EntityValidator.endpoint.description")); //$NON-NLS-1$
            }
            status.getItems().add(item);

            // 2. Gateway selected
            item = new StatusItemBean();
            item.setId("gateways"); //$NON-NLS-1$
            item.setName(Messages.i18n.format("EntityValidator.gateways.name")); //$NON-NLS-1$
            item.setDone(true);
            if (api.getGateways() == null || api.getGateways().isEmpty()) {
                item.setDone(false);
                item.setRemediation(Messages.i18n.format("EntityValidator.gateways.description")); //$NON-NLS-1$
            }
            status.getItems().add(item);

            // 3. Public or at least one plan
            /////////////////////////////////
            item = new StatusItemBean();
            item.setId("plans"); //$NON-NLS-1$
            item.setName(Messages.i18n.format("EntityValidator.plans.name")); //$NON-NLS-1$
            item.setDone(true);
            if (!api.isPublicAPI() && (api.getPlans() == null || api.getPlans().isEmpty())) {
                item.setDone(false);
                item.setRemediation(Messages.i18n.format("EntityValidator.plans.description")); //$NON-NLS-1$
            }
            status.getItems().add(item);

            // 4. At least one Policy (optional)
            ////////////////////////////////////
            item = new StatusItemBean();
            item.setId("policies"); //$NON-NLS-1$
            item.setName(Messages.i18n.format("EntityValidator.policies.name")); //$NON-NLS-1$
            item.setDone(true);
            item.setOptional(true);
            if (policies.isEmpty()) {
                item.setDone(false);
                item.setRemediation(Messages.i18n.format("EntityValidator.policies.description")); //$NON-NLS-1$
            }
            status.getItems().add(item);
        }

        return status;
    }
@see io.apiman.manager.api.core.IApiValidator#getStatus(io.apiman.manager.api.beans.apis.ApiVersionBean, java.util.List)
manager/api/core/src/main/java/io/apiman/manager/api/core/util/EntityValidator.java