Examples of RoleType


Examples of org.apache.cloudstack.acl.RoleType

        return _accountDao.findByIdIncludingRemoved(accountId);
    }

    @Override
    public RoleType getRoleType(Account account) {
        RoleType roleType = RoleType.Unknown;
        if (account == null)
            return roleType;
        short accountType = account.getType();

        // Account type to role type translation
View Full Code Here

Examples of org.apache.cloudstack.acl.RoleType

        return _accountDao.findByIdIncludingRemoved(accountId);
    }

    @Override
    public RoleType getRoleType(Account account) {
        RoleType roleType = RoleType.Unknown;
        if (account == null)
            return roleType;
        short accountType = account.getType();

        // Account type to role type translation
View Full Code Here

Examples of org.apache.cloudstack.acl.RoleType

        return _accountDao.findByIdIncludingRemoved(accountId);
    }

    @Override
    public RoleType getRoleType(Account account) {
        RoleType roleType = RoleType.Unknown;
        if (account == null)
            return roleType;
        short accountType = account.getType();

        // Account type to role type translation
View Full Code Here

Examples of org.apache.cloudstack.acl.RoleType

        }
    }

    @Override
    public RoleType getRoleType(Account account) {
        RoleType roleType = RoleType.Unknown;
        if (account == null)
            return roleType;
        short accountType = account.getType();

        // Account type to role type translation
View Full Code Here

Examples of org.apache.geronimo.xml.ns.security_1.RoleType

                return false;
            }
            DistinguishedNameType distinguishedName = (DistinguishedNameType)eObject;
            if (distinguishedName == null) {
                distinguishedName = (DistinguishedNameType)getEFactory().create(DistinguishedNameType.class);
                RoleType role = (RoleType) section.getSelectedObject();
                role.getDistinguishedName().add(distinguishedName);
            }
            distinguishedName.setName(name.getText());
            break;

        case PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText())) {
                return false;
            }
            PrincipalType principal = (PrincipalType)eObject;
            if (principal == null) {
                principal = (PrincipalType)getEFactory().create(PrincipalType.class);
                RoleType role = (RoleType) section.getSelectedObject();
                role.getPrincipal().add(principal);
            }
            principal.setName(name.getText());
            principal.setClazz(clazz.getText());
            break;

        case LOGIN_DOMAIN_PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())) {
                return false;
            }
            LoginDomainPrincipalType loginDomainPrincipal = (LoginDomainPrincipalType)eObject;
            if (loginDomainPrincipal == null) {
                loginDomainPrincipal = (LoginDomainPrincipalType)getEFactory().create(LoginDomainPrincipalType.class);
                RoleType role = (RoleType) section.getSelectedObject();
                role.getLoginDomainPrincipal().add(loginDomainPrincipal);
            }
            loginDomainPrincipal.setName(name.getText());
            loginDomainPrincipal.setClazz(clazz.getText());
            loginDomainPrincipal.setDomainName(domainName.getText());
            break;

        case REALM_PRINCIPAL:
            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())
                    || isEmpty(realmName.getText())) {
                return false;
            }
            RealmPrincipalType realmPrincipal = (RealmPrincipalType)eObject;
            if (realmPrincipal == null) {
                realmPrincipal = (RealmPrincipalType)getEFactory().create(RealmPrincipalType.class);
                RoleType role = (RoleType) section.getSelectedObject();
                role.getRealmPrincipal().add(realmPrincipal);
            }
            realmPrincipal.setName(name.getText());
            realmPrincipal.setClazz(clazz.getText());
            realmPrincipal.setDomainName(domainName.getText());
            realmPrincipal.setRealmName(realmName.getText());
View Full Code Here

Examples of org.apache.geronimo.xml.ns.security_1.RoleType

    @Override
    public void handleDelete() {
        TreeItem selectedItem = tree.getSelection()[0];
        Object selectedObject = selectedItem.getData();
        RoleType role = (RoleType) selectedItem.getParentItem().getData();
        try {
      ((ArrayList) JAXBUtils.getValue(role, selectedObject.getClass().getSimpleName())).remove(selectedObject);
    } catch (Exception e) {
      MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
    }
View Full Code Here

Examples of org.apache.geronimo.xml.ns.security_1.RoleType

                    roleExists = true;
                    break;
                }
            }
            if (!roleExists) {
              RoleType newRole = new RoleType();
                newRole.setRoleName(roleName);
                newRoles.add(newRole);
            }
        }
        definedRoles.addAll(newRoles);
        return newRoles.size() > 0;
View Full Code Here

Examples of org.apache.geronimo.xml.ns.security_1.RoleType

            public Object[] getChildren(Object parentElement) {
                if (RoleMappingsType.class.isInstance(parentElement)) {
                    return ((RoleMappingsType) parentElement).getRole().toArray();
                }
                if (parentElement instanceof RoleType) {
                  RoleType role = (RoleType) parentElement;
                    return concat(role.getDistinguishedName().toArray(), role.getPrincipal().toArray(),
                            role.getLoginDomainPrincipal().toArray(), role.getRealmPrincipal().toArray());
                }
                return new String[] {};
            }

            private Object[] concat(Object[] arr1, Object[] arr2, Object[] arr3, Object[] arr4) {
View Full Code Here

Examples of org.apache.geronimo.xml.ns.security_1.RoleType

    public ILabelProvider getLabelProvider() {
        return new LabelProvider() {
            @Override
            public String getText(Object element) {
                if (RoleType.class.isInstance(element)) {
                  RoleType role = (RoleType) element;
                    return "Role: role-name = \"" + role.getRoleName() + "\"";
                }
                else if (element instanceof DistinguishedNameType) {
                  DistinguishedNameType object = (DistinguishedNameType) element;
                    return "DistinguishedName: name = \"" + object.getName() + "\"";
                }
View Full Code Here

Examples of org.fenixedu.academic.domain.person.RoleType

        } else if (searchParameters.getName() != null) {

            persons = new ArrayList<Person>();

            persons.addAll(Person.findPerson(searchParameters.getName()));
            final RoleType roleBd = searchParameters.getRole();
            if (roleBd != null) {
                for (final Iterator<Person> peopleIterator = persons.iterator(); peopleIterator.hasNext();) {
                    final Person person = peopleIterator.next();
                    if (!person.hasRole(roleBd)) {
                        peopleIterator.remove();
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.