Package com.adito.boot

Examples of com.adito.boot.PropertyList


        if (!Util.isNullOrTrimmedBlank(requestShowPersonalPolicies))
            setShowPersonalPolicies(Boolean.parseBoolean(requestShowPersonalPolicies));
       
        AbstractWizardSequence seq = getWizardSequence(request);
       
        selectedPolicies = (PropertyList)seq.getAttribute(getAttributeKey(), new PropertyList());
       
        policyModel = initSelectModel(mapping, request, selectedPolicies, isShowPersonalPolicies());
       
        setSelectedPolicies(selectedPolicies);
       
View Full Code Here


    /**
     * Constructor
     */
    public AccessRightsForm() {
        super();
        selectedAccessRights = new PropertyList();
    }
View Full Code Here

        pf.setUpdateAction(mapping.getPath() + ".do");
        pf.setInput(mapping.getInput());

        // Now try the struts supplied action mapping parameter
        if (mapping.getParameter() != null && !mapping.getParameter().equals("")) {
            PropertyList pl = new PropertyList(mapping.getParameter());
            Properties pr = pl.getAsNameValuePairs();
            BeanUtils.populate(pf, pr);
        }

        if ("changeSelectedCategory".equalsIgnoreCase(pf.getActionTarget())) {
            pf.setSelectedCategory(pf.getNewSelectedCategory());
View Full Code Here

     *      javax.servlet.http.HttpServletRequest)
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errs = super.validate(mapping, request);
        if (isCommiting()) {
            PropertyList l = getSelectedModulesList();
            if (l.size() < 1) {
                errs.add(Globals.ERROR_KEY, new ActionMessage("editAuthenticationScheme.error.noModulesSelected"));
            } else {
                AuthenticationModuleDefinition def = AuthenticationModuleManager.getInstance().getModuleDefinition(
                    l.get(0).toString());
                if (l.size() == 1){
                    if (!def.getPrimary()) {
                        errs.add(Globals.ERROR_KEY, new ActionMessage("editAuthenticationScheme.error.firstModuleNotPrimary"));
                    }
                }
                else{
View Full Code Here

     *
     * @param users list of {@link User} objects attached to the role
     */
    public void initialize(Collection<User> users) {
        rolename = "";       
        this.users = new PropertyList();
        for (User user : users) {
            this.users.add(user.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(TunnelDetailsForm.ATTR_RESOURCE_NAME, null);
        PropertyList l = (PropertyList) sequence.getAttribute(TunnelPolicySelectionForm.ATTR_SELECTED_POLICIES, null);
        selectedPolicies = new ArrayList<String>();
        if (SessionInfo.USER_CONSOLE_CONTEXT == LogonControllerFactory.getInstance().getSessionInfo(request).getNavigationContext()) {
            for(Iterator i = l.iterator(); i.hasNext(); ) {
                selectedPolicies.add(i.next().toString());
            }
        } else {
            for(Iterator i = l.iterator(); i.hasNext(); ) {
                selectedPolicies.add(PolicyDatabaseFactory.getInstance().getPolicy(Integer.parseInt(i.next().toString())).getResourceName());
            }
        }
        user = (User) sequence.getAttribute(TunnelDetailsAction.ATTR_USER, null);
    }
View Full Code Here

     * @param info
     * @param resource
     * @return WizardActionStatus
     */
    WizardActionStatus attachToPolicies(AbstractWizardSequence seq, SessionInfo info, Resource resource) {
        PropertyList selectedPolicies = (PropertyList) seq.getAttribute(ProfilePolicySelectionForm.ATTR_SELECTED_POLICIES, null);
        try {
            PolicyDatabaseFactory.getInstance().attachResourceToPolicyList(resource, selectedPolicies, info);
            return new WizardActionStatus(WizardActionStatus.COMPLETED_OK, "profileWizard.profileFinish.status.attachedToPolicies");
        } catch (Exception e) {
            log.error("Failed to create profile.", e);
View Full Code Here

        listItemsList.add(pair);
      }
      listItems = new Pair[listItemsList.size()];
      listItemsList.toArray(listItems);
    } else if (definition.getType() == PropertyDefinition.TYPE_MULTI_ENTRY_LIST) {
      this.value = new PropertyList(value).getAsTextFieldText();
      StringTokenizer t = new StringTokenizer(definition.getTypeMeta(), "x");
      try {
        columns = Integer.parseInt(t.nextToken());
        rows = Integer.parseInt(t.nextToken());
      } catch (NumberFormatException nfe) {
View Full Code Here

  public String getDefaultText() {
    String val = getDefaultValue();
    if (definition.getType() == PropertyDefinition.TYPE_PASSWORD) {
      val = "";
    } else if (definition.getType() == PropertyDefinition.TYPE_MULTI_ENTRY_LIST) {
      PropertyList list = new PropertyList(definition.getDefaultValue());
      val = list.size() > 0 ? list.getPropertyItem(0) : "";
    } else if (definition.getType() == PropertyDefinition.TYPE_LIST) {
      try {
        int defaultItem = Integer.parseInt(definition.getDefaultValue());
        String k = "application." + app.getId() + "." + definition.getName() + ".value." + defaultItem;
        val = app.getMessageResources().getMessage(k);
View Full Code Here

   *
   * @return property value
   */
  public Object getPropertyValue() {
    if (definition.getType() == PropertyDefinition.TYPE_MULTI_ENTRY_LIST) {
      PropertyList l = new PropertyList();
      l.setAsTextFieldText(getValue().toString());
      return l.getAsPropertyText();
    } else if (definition.getType() == PropertyDefinition.TYPE_BOOLEAN) {
      String trueVal = (String) (((List) definition.getTypeMetaObject()).get(0));
      String falseVal = (String) (((List) definition.getTypeMetaObject()).get(1));
      return Boolean.TRUE.equals(getValue()) ? trueVal : falseVal;
    }
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.