Examples of StatusBean


Examples of org.apache.syncope.console.commons.StatusBean

        connObjectWin.setInitialHeight(CONNOBJECT_WIN_HEIGHT);
        connObjectWin.setInitialWidth(CONNOBJECT_WIN_WIDTH);
        connObjectWin.setCookieName("connobject-modal");
        add(connObjectWin);

        final StatusBean syncope = new StatusBean();
        syncope.setResourceName("Syncope");
        if (attributable instanceof UserTO) {
            UserTO userTO = (UserTO) attributable;
            syncope.setAccountLink(userTO.getUsername());

            Status syncopeStatus = Status.UNDEFINED;
            if (userTO.getStatus() != null) {
                try {
                    syncopeStatus = Status.valueOf(userTO.getStatus().toUpperCase());
                } catch (IllegalArgumentException e) {
                    LOG.warn("Unexpected status found: {}", userTO.getStatus());
                }
            }
            syncope.setStatus(syncopeStatus);
        }
        if (attributable instanceof RoleTO) {
            RoleTO roleTO = (RoleTO) attributable;
            syncope.setAccountLink(roleTO.getDisplayName());
            syncope.setStatus(Status.ACTIVE);
        }

        StatusUtils statusUtils = new StatusUtils((attributable instanceof UserTO ? userRestClient : roleRestClient));

        connObjects = statusUtils.getConnectorObjects(attributable);

        List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
        statusBeans.add(syncope);
        initialStatusBeanMap = new LinkedHashMap<String, StatusBean>(connObjects.size() + 1);
        initialStatusBeanMap.put(syncope.getResourceName(), syncope);
        for (Map.Entry<String, ConnObjectTO> entry : connObjects.entrySet()) {
            final StatusBean statusBean = statusUtils.getStatusBean(entry.getKey(), entry.getValue());

            initialStatusBeanMap.put(entry.getKey(), statusBean);
            statusBeans.add(statusBean);
        }
View Full Code Here

Examples of org.apache.syncope.console.commons.StatusBean

        connObjectWin.setInitialHeight(CONNOBJECT_WIN_HEIGHT);
        connObjectWin.setInitialWidth(CONNOBJECT_WIN_WIDTH);
        connObjectWin.setCookieName("connobject-modal");
        add(connObjectWin);

        final StatusBean syncope = new StatusBean();
        syncope.setResourceName("Syncope");
        if (attributable instanceof UserTO) {
            UserTO userTO = (UserTO) attributable;
            syncope.setAccountLink(userTO.getUsername());

            Status syncopeStatus = Status.UNDEFINED;
            if (userTO.getStatus() != null) {
                try {
                    syncopeStatus = Status.valueOf(userTO.getStatus().toUpperCase());
                } catch (IllegalArgumentException e) {
                    LOG.warn("Unexpected status found: {}", userTO.getStatus());
                }
            }
            syncope.setStatus(syncopeStatus);
        }
        if (attributable instanceof RoleTO) {
            RoleTO roleTO = (RoleTO) attributable;
            syncope.setAccountLink(roleTO.getDisplayName());
            syncope.setStatus(Status.ACTIVE);
        }

        StatusUtils statusUtils = new StatusUtils((attributable instanceof UserTO ? userRestClient : roleRestClient));

        connObjects = statusUtils.getConnectorObjects(attributable);

        List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
        statusBeans.add(syncope);
        initialStatusBeanMap = new LinkedHashMap<String, StatusBean>(connObjects.size() + 1);
        initialStatusBeanMap.put(syncope.getResourceName(), syncope);
        for (Map.Entry<String, ConnObjectTO> entry : connObjects.entrySet()) {
            final StatusBean statusBean = statusUtils.getStatusBean(entry.getKey(), entry.getValue());

            initialStatusBeanMap.put(entry.getKey(), statusBean);
            statusBeans.add(statusBean);
        }
View Full Code Here

Examples of org.apache.syncope.console.commons.StatusBean

        connObjectWin.setInitialHeight(CONNOBJECT_WIN_HEIGHT);
        connObjectWin.setInitialWidth(CONNOBJECT_WIN_WIDTH);
        connObjectWin.setCookieName("connobject-modal");
        add(connObjectWin);

        final StatusBean syncope = new StatusBean();
        syncope.setResourceName("Syncope");
        if (attributable instanceof UserTO) {
            UserTO userTO = (UserTO) attributable;
            syncope.setAccountLink(userTO.getUsername());

            Status syncopeStatus = Status.UNDEFINED;
            if (userTO.getStatus() != null) {
                try {
                    syncopeStatus = Status.valueOf(userTO.getStatus().toUpperCase());
                } catch (IllegalArgumentException e) {
                    LOG.warn("Unexpected status found: {}", userTO.getStatus());
                }
            }
            syncope.setStatus(syncopeStatus);
        }
        if (attributable instanceof RoleTO) {
            RoleTO roleTO = (RoleTO) attributable;
            syncope.setAccountLink(roleTO.getDisplayName());
            syncope.setStatus(Status.ACTIVE);
        }

        StatusUtils statusUtils = new StatusUtils((attributable instanceof UserTO ? userRestClient : roleRestClient));

        connObjects = statusUtils.getConnectorObjects(attributable);

        List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
        statusBeans.add(syncope);
        initialStatusBeanMap = new LinkedHashMap<String, StatusBean>(connObjects.size() + 1);
        initialStatusBeanMap.put(syncope.getResourceName(), syncope);
        for (Map.Entry<String, ConnObjectTO> entry : connObjects.entrySet()) {
            final StatusBean statusBean = statusUtils.getStatusBean(entry.getKey(), entry.getValue());

            initialStatusBeanMap.put(entry.getKey(), statusBean);
            statusBeans.add(statusBean);
        }
View Full Code Here

Examples of org.apache.syncope.console.commons.StatusBean

        super(id);

        final List<StatusBean> statuses = new ArrayList<StatusBean>();

        final StatusBean syncope = new StatusBean();
        syncope.setAccountLink(userTO.getUsername());
        syncope.setResourceName("Syncope");
        Status syncopeStatus = Status.UNDEFINED;
        if (userTO.getStatus() != null) {
            try {
                syncopeStatus = Status.valueOf(userTO.getStatus().toUpperCase());
            } catch (IllegalArgumentException e) {
                LOG.warn("Unexpected status found: {}", userTO.getStatus());
            }
        }
        syncope.setStatus(syncopeStatus);

        statuses.add(syncope);
        statuses.addAll(statusUtils.getRemoteStatuses(userTO));

        final CheckGroup group = new CheckGroup("group", selectedResources);
View Full Code Here

Examples of org.apache.syncope.console.commons.StatusBean

        connObjectWin.setInitialHeight(CONNOBJECT_WIN_HEIGHT);
        connObjectWin.setInitialWidth(CONNOBJECT_WIN_WIDTH);
        connObjectWin.setCookieName("connobject-modal");
        add(connObjectWin);

        final StatusBean syncope = new StatusBean();
        syncope.setResourceName("Syncope");
        if (attributable instanceof UserTO) {
            UserTO userTO = (UserTO) attributable;
            syncope.setAccountLink(userTO.getUsername());

            Status syncopeStatus = Status.UNDEFINED;
            if (userTO.getStatus() != null) {
                try {
                    syncopeStatus = Status.valueOf(userTO.getStatus().toUpperCase());
                } catch (IllegalArgumentException e) {
                    LOG.warn("Unexpected status found: {}", userTO.getStatus());
                }
            }
            syncope.setStatus(syncopeStatus);
        }
        if (attributable instanceof RoleTO) {
            RoleTO roleTO = (RoleTO) attributable;
            syncope.setAccountLink(roleTO.getDisplayName());
            syncope.setStatus(Status.ACTIVE);
        }

        StatusUtils statusUtils = new StatusUtils((attributable instanceof UserTO ? userRestClient : roleRestClient));

        connObjects = statusUtils.getConnectorObjects(attributable);

        List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
        statusBeans.add(syncope);
        initialStatusBeanMap = new LinkedHashMap<String, StatusBean>(connObjects.size() + 1);
        initialStatusBeanMap.put(syncope.getResourceName(), syncope);
        for (Map.Entry<String, ConnObjectTO> entry : connObjects.entrySet()) {
            final StatusBean statusBean = statusUtils.getStatusBean(entry.getKey(), entry.getValue());

            initialStatusBeanMap.put(entry.getKey(), statusBean);
            statusBeans.add(statusBean);
        }
View Full Code Here

Examples of org.apache.syncope.console.commons.StatusBean

        super(id);

        final List<StatusBean> statuses = new ArrayList<StatusBean>();

        final StatusBean syncope = new StatusBean();
        syncope.setAccountLink(userTO.getUsername());
        syncope.setResourceName("Syncope");
        syncope.setStatus(userTO.getStatus() != null
                ? Status.valueOf(userTO.getStatus().toUpperCase())
                : Status.UNDEFINED);

        statuses.add(syncope);
        statuses.addAll(statusUtils.getRemoteStatuses(userTO));
View Full Code Here

Examples of org.apache.syncope.console.commons.status.StatusBean

        connObjects = statusUtils.getConnectorObjects(subject);

        final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
        initialStatusBeanMap = new LinkedHashMap<String, StatusBean>(connObjects.size() + 1);

        final StatusBean syncope = new StatusBean(subject, "syncope");

        if (subject instanceof UserTO) {
            syncope.setAccountLink(((UserTO) subject).getUsername());

            Status syncopeStatus = Status.UNDEFINED;
            if (((UserTO) subject).getStatus() != null) {
                try {
                    syncopeStatus = Status.valueOf(((UserTO) subject).getStatus().toUpperCase());
                } catch (IllegalArgumentException e) {
                    LOG.warn("Unexpected status found: {}", ((UserTO) subject).getStatus(), e);
                }
            }
            syncope.setStatus(syncopeStatus);
        } else if (subject instanceof RoleTO) {
            syncope.setAccountLink(((RoleTO) subject).getDisplayName());
            syncope.setStatus(Status.ACTIVE);
        }

        statusBeans.add(syncope);
        initialStatusBeanMap.put(syncope.getResourceName(), syncope);

        for (ConnObjectWrapper entry : connObjects) {
            final StatusBean statusBean = statusUtils.getStatusBean(
                    entry.getAttributable(),
                    entry.getResourceName(),
                    entry.getConnObjectTO(),
                    subject instanceof RoleTO);
View Full Code Here

Examples of org.apache.syncope.console.commons.status.StatusBean

            final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
            final LinkedHashMap<String, StatusBean> initialStatusBeanMap = new LinkedHashMap<String, StatusBean>(
                    connObjects.size());

            for (ConnObjectWrapper entry : connObjects) {
                final StatusBean statusBean = statusUtils.getStatusBean(
                        entry.getAttributable(),
                        entry.getResourceName(),
                        entry.getConnObjectTO(),
                        RoleTO.class.isAssignableFrom(typeRef));
View Full Code Here

Examples of org.apache.syncope.console.commons.status.StatusBean

                statusUtils.getConnectorObjects(Collections.singletonList(subjectTO), resources);

        final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size());

        for (ConnObjectWrapper entry : connObjects) {
            final StatusBean statusBean = statusUtils.getStatusBean(
                    subjectTO,
                    entry.getResourceName(),
                    entry.getConnObjectTO(),
                    subjectTO instanceof RoleTO);
View Full Code Here

Examples of org.apache.syncope.console.commons.status.StatusBean

            final List<ConnObjectWrapper> connObjects = statusUtils.getConnectorObjects(subjectTO);

            final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);

            for (ConnObjectWrapper entry : connObjects) {
                final StatusBean statusBean = statusUtils.getStatusBean(
                        subjectTO,
                        entry.getResourceName(),
                        entry.getConnObjectTO(),
                        subjectTO instanceof RoleTO);

                statusBeans.add(statusBean);
                resources.remove(entry.getResourceName());
            }

            if (statusOnly) {
                final StatusBean syncope = new StatusBean(subjectTO, "Syncope");

                syncope.setAccountLink(((UserTO) subjectTO).getUsername());

                Status syncopeStatus = Status.UNDEFINED;
                if (((UserTO) subjectTO).getStatus() != null) {
                    try {
                        syncopeStatus = Status.valueOf(((UserTO) subjectTO).getStatus().toUpperCase());
                    } catch (IllegalArgumentException e) {
                        LOG.warn("Unexpected status found: {}", ((UserTO) subjectTO).getStatus(), e);
                    }
                }
                syncope.setStatus(syncopeStatus);

                statusBeans.add(syncope);
            } else {
                for (String resource : resources) {
                    final StatusBean statusBean = statusUtils.getStatusBean(
                            subjectTO,
                            resource,
                            null,
                            subjectTO instanceof RoleTO);

                    statusBean.setLinked(false);
                    statusBeans.add(statusBean);
                }
            }

            return statusBeans;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.