Package com.adito.boot

Examples of com.adito.boot.PropertyList


    /* (non-Javadoc)
     * @see com.adito.boot.PropertyValidator#validate(com.adito.boot.PropertyDefinition, java.lang.String, java.util.Properties)
     */
    public void validate(PropertyDefinition definition, String value, Properties properties) throws CodedException {
        PropertyList propertyList = new PropertyList(value);
        for (String propertyValue : propertyList) {
            validate(propertyValue);
        }
    }
View Full Code Here


        PolicyUtil.checkPermission(PolicyConstants.ACCOUNTS_AND_GROUPS_RESOURCE_TYPE, PolicyConstants.PERM_CREATE_EDIT_AND_ASSIGN, request);
        SessionInfo info = this.getSessionInfo(request);
        UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(getSessionInfo(request).getUser().getRealm());
        User user = null;
        if(udb.supportsAccountCreation()) {
            PropertyList roleList = account.getRolesList();
            int idx = 0;
            Role[] roles = new Role[roleList.size()];
            for(Iterator i = roleList.iterator(); i.hasNext(); ) {
                roles[idx++] = udb.getRole((String)i.next());
            }

            if (account.getEditing()) {
                user = udb.getAccount(account.getUsername());
View Full Code Here

        }
    }

    private synchronized void setLastContactedActiveDirectoryUrl(URI url) {
        if (lastContactedActiveDirectoryUrl == null || !lastContactedActiveDirectoryUrl.equals(url)) {
            PropertyList kerbrosControllerSettings = getKerbrosControllerSettings(url);
            propertyManager.refresh(Collections.singletonMap("activeDirectory.backupControllerHosts", kerbrosControllerSettings.getAsPropertyText()));
        }
        lastContactedActiveDirectoryUrl = url;
    }
View Full Code Here

        }
        lastContactedActiveDirectoryUrl = url;
    }

    private PropertyList getKerbrosControllerSettings(URI contactedUrl) {
        PropertyList values = new PropertyList();
        values.add(getKerbrosController(contactedUrl));

        for (URI url : activeDirectoryUrls) {
            String kerbrosController = getKerbrosController(url);
            if (!values.contains(kerbrosController)) {
                values.add(kerbrosController);
            }
        }
        return values;
    }
View Full Code Here

        Policy policy = createPolicy(realm);
        User user = createAccount();
        getPolicyService().grantPolicyToPrincipal(policy, user);
       
        AccessRights accessRights = createAssignAccessRights(getResourceType().getPermissionClass());
        PropertyList selectedPolicies = PropertyList.createFromArray(new int[] {policy.getResourceId()});
        PolicyDatabaseFactory.getInstance().attachResourceToPolicyList(accessRights, selectedPolicies, getSessionInfo());
        AuthenticationScheme resource = createResource();
        assertTrue("Should be, as one already exists.", getPolicyService().isPrincipalGrantedResourcesOfType(user, resource.getResourceType(), null));
        assertEquals("Should be four.", getPolicyService().getGrantedResourcesOfType(user, getResourceType()).size(), 4);
       
View Full Code Here

public class ListValidator implements PropertyValidator {
 
  final static Log log = LogFactory.getLog(ListValidator.class);

  public void validate(PropertyDefinition definition, String value, Properties properties) throws CodedException {
    PropertyList pl = new PropertyList(value);   
    String className = properties.getProperty("className");
    Properties p = new Properties(properties);
    p.remove("className");
    try {
      Class clazz = getClass().forName(className);
View Full Code Here

public class ReplacementProxyWebForwardTests extends AbstractWebForwardTests {

    @Override
    public WebForward getEmptyResource() throws Exception {
        Calendar calendar = Calendar.getInstance();
        return new ReplacementProxyWebForward(-1, 1, "", "", "", "", "", "", "", "", new PropertyList(), "", "", false, calendar, calendar);
    }
View Full Code Here

    }

    @Override
    public WebForward getNormalResource() throws Exception {
        Calendar calendar = Calendar.getInstance();
        return new ReplacementProxyWebForward(getDefaultRealm().getRealmID(), 1, "http://mail.3sp.co.uk", "OWA", "Outlook web access.", "General", "", "", "None", "", new PropertyList(), "", "", false, calendar, calendar);
    }
View Full Code Here

    }

    @Override
    public WebForward getNullResource() throws Exception {
        Calendar calendar = Calendar.getInstance();
        return new ReplacementProxyWebForward(-1, 1, null, null, null, null, null, null, null, null, new PropertyList(), "", "", false, calendar, calendar);
    }
View Full Code Here

    public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        MessageForm mf = (MessageForm)form;
        mf.setReferer(CoreUtil.getReferer(request));
        PropertyList selectedPolicies = new PropertyList();
        MultiSelectDataSource policies = new PolicyDataSource();
        SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
     
        String users = request.getParameter("users");
       
View Full Code Here

TOP

Related Classes of com.adito.boot.PropertyList

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.