Package org.apache.syncope.console.commons

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


        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

        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

        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

        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

        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

TOP

Related Classes of org.apache.syncope.console.commons.StatusBean

Copyright © 2018 www.massapicom. 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.