Examples of CPDParameterTypeRestriction


Examples of org.jasig.portal.portlets.portletadmin.xmlsupport.CPDParameterTypeRestriction

            // if this parameter has a restriction in the CPD,
            // check it against the restriction
            if (param.getType().getRestriction() != null
                && def.getParameters().containsKey(param.getName())) {
             
              CPDParameterTypeRestriction restriction = param.getType().getRestriction();
              if ("range".equals(restriction.getType())) {
                // For now, lets just not do anything.  It doesn't
                // look like the existing channel manager logic
                // actually uses this restriction for validation
              } else if ("enumeration".equals(restriction.getType())) {
                // if this restriction is an enumeration of allowed values, check to
                // make sure the entered value is in the enumerated list
                if (!restriction.getValues().contains(paramValue)) {
                  context.addMessage(new MessageBuilder().error().source(paramPath)
                      .code("errors.channelDefinition.param.enum")
                      .defaultText("Invalid selection").build());
                }
              }
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.