Package com.adito.boot

Examples of com.adito.boot.PropertyList


     * @throws Exception
     */
    public ActionForward toogleShowPersonalPolicies(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                throws Exception {
        MessageForm mf = (MessageForm)form;
        PropertyList selectedPolicies = new PropertyList();
       
        SessionInfo session = this.getSessionInfo(request);
       
        String users = request.getParameter("users");

View Full Code Here


     * @see com.adito.wizard.forms.AbstractWizardForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        super.reset(mapping, request);
        AbstractWizardSequence seq = getWizardSequence(request);
        selectedAccessRights = (PropertyList)seq.getAttribute(getAttributeKey(), new PropertyList())
        SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
        String permissionClass = (String) seq.getAttribute(AccessRightsDetailsForm.ATTR_RESOURCE_PERMISSION_CLASS,
                        PolicyConstants.DELEGATION_CLASS);
        AccessRightsMultiSelectDataSource accessRightsMultiSelectDataSource = new AccessRightsMultiSelectDataSource(permissionClass);
        accessRightsModel = new MultiSelectSelectionModel(session, accessRightsMultiSelectDataSource, selectedAccessRights);
View Full Code Here

     * @see com.adito.wizard.forms.AbstractWizardForm#init(com.adito.wizard.AbstractWizardSequence)
     */
    public void init(AbstractWizardSequence sequence, HttpServletRequest requestthrows Exception {
        policyName = (String)sequence.getAttribute(PolicyDetailsForm.ATTR_RESOURCE_NAME, "");
        policyDescription = (String)sequence.getAttribute(PolicyDetailsForm.ATTR_RESOURCE_DESCRIPTION, "");
        PropertyList la = (PropertyList)sequence.getAttribute(PolicyPrincipalSelectionForm.ATTR_SELECTED_ACCOUNTS, null);
        PropertyList lr = (PropertyList)sequence.getAttribute(PolicyPrincipalSelectionForm.ATTR_SELECTED_ROLES, null);
        selectedAccounts = new ArrayList();
        UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(LogonControllerFactory.getInstance().getSessionInfo(request).getUser().getRealm());
        for(Iterator i = la.iterator(); i.hasNext(); ) {
            selectedAccounts.add(udb.getAccount(i.next().toString()).getPrincipalName());
        }
        selectedRoles = new ArrayList();
        for(Iterator i = lr.iterator(); i.hasNext(); ) {
            selectedRoles.add(udb.getRole(i.next().toString()).getPrincipalName());
        }
    }
View Full Code Here

     *
     * @see com.adito.wizard.forms.AbstractWizardForm#init(com.adito.wizard.AbstractWizardSequence)
     */
    public void init(AbstractWizardSequence sequence, HttpServletRequest request) throws Exception {
        resourceName = (String) sequence.getAttribute(SampleDefaultDetailsForm.ATTR_RESOURCE_NAME, null);
        PropertyList l = (PropertyList) sequence.getAttribute(SamplePolicySelectionForm.ATTR_SELECTED_POLICIES, null);
        selectedPolicies = new ArrayList();
        for (Iterator i = l.iterator(); i.hasNext();) {
            selectedPolicies.add(CoreServlet.getServlet().getPolicyDatabase().getPolicy(Integer.parseInt(i.next().toString()))
                            .getResourceName());
        }
        user = (User) sequence.getAttribute(SampleDetailsAction.ATTR_USER, null);
    }
View Full Code Here

        ActionForward forward = super.edit(mapping, form, request, response);
        if (forward.getName().equals("home")){
            // super returned a home, so we must go home.
            return forward;
        }
        PropertyList selectedModules = new PropertyList();
        SessionInfo session = LogonControllerFactory.getInstance().getSessionInfo(request);
        MultiSelectDataSource modules = new ModulesDataSource("security");
        AuthenticationScheme seq = ((DefaultAuthenticationScheme) ((AbstractResourceForm) form).getResource());
        for (int i = 0; i < seq.getModuleCount(); i++) {
            String module = seq.getModule(i);
            selectedModules.add(module);
        }
        MultiSelectSelectionModel moduleModel = new MultiSelectSelectionModel(session, modules, selectedModules);
        ((AuthenticationSchemeForm) form).setModuleModel(moduleModel);
        ((AuthenticationSchemeForm) form).setSelectedModulesList(selectedModules);
        return forward;
View Full Code Here

       
        String dbMaxTries = String.valueOf(Property.getPropertyInt(getRealmKey("activeDirectory.kdcMaxTries")));
        String maxTries = getRealValue(alternativeValues, "activeDirectory.kdcMaxTries", dbMaxTries);
        replacements.put(KDC_MAX_TRIES, maxTries);
       
        PropertyList dbActiveDirectryUris = new PropertyList();
        dbActiveDirectryUris.add(controllerHost);
        dbActiveDirectryUris.addAll(Property.getPropertyList(getRealmKey("activeDirectory.backupControllerHosts")));
        PropertyList activeDirectryUris = getRealValue(alternativeValues,"activeDirectory.backupControllerHosts", dbActiveDirectryUris);
        replacements.put(HOST_REALMS, buildBackupHostRealms(activeDirectryUris));
        replacements.put(DOMAIN_REALMS, buildBackupDomainRealms(domain, activeDirectryUris));
        return replacements;
    }
View Full Code Here

    private static String getRealValue(Map<String, String> alternativeValues, String key, String value) {
        return alternativeValues.containsKey(key) ? alternativeValues.get(key): value;
    }

    private static PropertyList getRealValue(Map<String, String> alternativeValues, String key, PropertyList values) {
        return alternativeValues.containsKey(key) ? new PropertyList (alternativeValues.get(key) ): 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());
        PropertyProfile resource = createResource();
        assertTrue("Should be, as one already exists.", getPolicyService().isPrincipalGrantedResourcesOfType(user, resource.getResourceType(), null));
        assertEquals("Should be only one.", getPolicyService().getGrantedResourcesOfType(user, getResourceType()).size(), 1);
       
View Full Code Here

     * @param request
     * @return wizard status
     */
   
    protected WizardActionStatus attachToPoliciesAndAddToFavorites(String messagePrefix, AbstractWizardSequence seq, Resource resource, boolean addToFavorites, HttpServletRequest request) {
        PropertyList selectedPolicies = (PropertyList) seq.getAttribute(AbstractWizardPolicySelectionForm.ATTR_SELECTED_POLICIES,
            null);
        try {
            if (SessionInfo.USER_CONSOLE_CONTEXT == this.getSessionInfo(request).getNavigationContext()) {
                Policy policy = PolicyDatabaseFactory.getInstance().getPolicyByName(
                    PolicyUtil.getPersonalPolicyName(getSessionInfo(request).getUser().getPrincipalName()),
View Full Code Here

            }

            // Configure any HTTP / HTTPS / SOCKS proxy servers
            configureProxyServers();

            PropertyList l = contextConfiguration.retrievePropertyList(new ContextKey("webServer.bindAddress"));
            getBootProgressMonitor().updateMessage("Creating server lock");
            getBootProgressMonitor().updateProgress(6);
            serverLock = new ServerLock((String) l.get(0));
            if (serverLock.isLocked()) {
                if (!isSetupMode()) {
                    if (serverLock.isSetup()) {
                        throw new Exception("The installation wizard is currently running. "
                                        + "Please shut this down by pointing your browser " + "to http://" + getHostname() + ":"
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.