Examples of ConstrainedProperty


Examples of com.uwyn.rife.site.ConstrainedProperty

    init();
  }
 
  private void init()
  {
    addConstraint(new ConstrainedProperty("nickname").notNull(true).notEmpty(true).maxLength(30));
    addConstraint(new ConstrainedProperty("moment").notNull(true));
    addConstraint(new ConstrainedProperty("message").notNull(true));
    addConstraint(new ConstrainedProperty("raw").notNull(true));
    }
View Full Code Here

Examples of com.uwyn.rife.site.ConstrainedProperty

    init();
  }
 
  private void init()
  {
    addConstraint(new ConstrainedProperty("id").notNull(true));
    addConstraint(new ConstrainedProperty("name").notNull(true).notEmpty(true).maxLength(255));
    addConstraint(new ConstrainedProperty("lowcasekey").notNull(true).notEmpty(true).maxLength(255));
    addConstraint(new ConstrainedProperty("answer").notNull(true).notEmpty(true));
    addConstraint(new ConstrainedProperty("random").notNull(true).defaultValue(false));
    }
View Full Code Here

Examples of com.uwyn.rife.site.ConstrainedProperty

    {
    }
   
    public void activateValidation()
    {
      addConstraint(new ConstrainedProperty("bot").notNull(true).notEmpty(true));
      addConstraint(new ConstrainedProperty("target").notNull(true).notEmpty(true));
      addConstraint(new ConstrainedProperty("message").notNull(true).notEmpty(true));
    }
View Full Code Here

Examples of com.uwyn.rife.site.ConstrainedProperty

          }
        }
       
        new SortListComparables().sort(channels);
 
        addConstraint(new ConstrainedProperty("channel")
                  .inList((String[])channels.toArray(new String[0])));
        addConstraint(new ConstrainedProperty("keyword").notNull(true).notEmpty(true));
      }
    }
View Full Code Here

Examples of grails.validation.ConstrainedProperty

        }

        @Override
        public Object getProperty(String name) {
            if (urlDefiningMode) {
                final ConstrainedProperty newConstrained = new ConstrainedProperty(UrlMapping.class, name, String.class);
                previousConstraints.add(newConstrained);
                return CAPTURING_WILD_CARD;
            }
            return super.getProperty(name);
        }
View Full Code Here

Examples of grails.validation.ConstrainedProperty

                uriBuilder.append(parentResource.uri);
            }
            else {
                if (parentResource.controllerName != null) {
                    uriBuilder.append(parentResource.uri).append(SLASH).append(CAPTURING_WILD_CARD);
                    constrainedList.add(new ConstrainedProperty(UrlMapping.class, parentResource.controllerName + "Id", String.class));
                }
            }

            uriBuilder.append(uri);
            return uriBuilder.toString();
View Full Code Here

Examples of grails.validation.ConstrainedProperty

        }

        protected UrlMapping createEditActionResourcesRestfulMapping(String controllerName, Object pluginName, Object namespace, String version, UrlMappingData urlData, List<ConstrainedProperty> constrainedList) {
            UrlMappingData editUrlMappingData = urlData.createRelative('/' + CAPTURING_WILD_CARD + "/edit");
            List<ConstrainedProperty> editUrlMappingConstraints = new ArrayList<ConstrainedProperty>(constrainedList);
            editUrlMappingConstraints.add(new ConstrainedProperty(UrlMapping.class, "id", String.class));

            return new RegexUrlMapping(editUrlMappingData,controllerName, ACTION_EDIT, namespace, pluginName, null, HttpMethod.GET.toString(), version,editUrlMappingConstraints.toArray(new ConstrainedProperty[editUrlMappingConstraints.size()]) , servletContext);
        }
View Full Code Here

Examples of grails.validation.ConstrainedProperty

            return new RegexUrlMapping(showUrlMappingData,controllerName, ACTION_SHOW, namespace, pluginName, null, HttpMethod.GET.toString(), version,showUrlMappingConstraints.toArray(new ConstrainedProperty[showUrlMappingConstraints.size()]) , servletContext);
        }

        private List<ConstrainedProperty> createConstraintsWithIdAndFormat(List<ConstrainedProperty> constrainedList) {
            List<ConstrainedProperty> showUrlMappingConstraints = new ArrayList<ConstrainedProperty>(constrainedList);
            showUrlMappingConstraints.add(new ConstrainedProperty(UrlMapping.class, "id", String.class));
            ConstrainedProperty cp = new ConstrainedProperty(UrlMapping.class, "format", String.class);
            cp.setNullable(true);
            showUrlMappingConstraints.add(cp);
            return showUrlMappingConstraints;
        }
View Full Code Here

Examples of grails.validation.ConstrainedProperty

            return new RegexUrlMapping(indexActionUrlMappingData, controllerName, ACTION_INDEX, namespace, pluginName, null, HttpMethod.GET.toString(), version,indexUrlMappingConstraints.toArray(new ConstrainedProperty[indexUrlMappingConstraints.size()]), servletContext);
        }

        private List<ConstrainedProperty> createFormatOnlyConstraints(List<ConstrainedProperty> constrainedList) {
            List<ConstrainedProperty> indexUrlMappingConstraints = new ArrayList<ConstrainedProperty>(constrainedList);
            ConstrainedProperty cp = new ConstrainedProperty(UrlMapping.class, "format", String.class);
            cp.setNullable(true);
            indexUrlMappingConstraints.add(cp);
            return indexUrlMappingConstraints;
        }
View Full Code Here

Examples of grails.validation.ConstrainedProperty

    }

    public boolean hasRuntimeVariable(String name) {
        if (constraints != null) {
            for (int i = 0; i < constraints.length; i++) {
                ConstrainedProperty cp = constraints[i];
                if (cp.getPropertyName().equals(name)) return true;
            }
        }
        return false;
    }
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.