Package org.dspace.app.cris.model.jdyna

Examples of org.dspace.app.cris.model.jdyna.DecoratorRPPropertiesDefinition


  }
 
  @Override
  public void validate(Object object, Errors errors) {

    DecoratorRPPropertiesDefinition metadato = (DecoratorRPPropertiesDefinition) object;

    // lo shortname non puo' essere vuoto

    String shortName = metadato.getShortName();

    // validazione shortname...deve essere unico e non nullo e formato solo da caratteri
    // alfabetici da 'a-zA-Z','_' e '-'
    boolean result = (shortName != null) && shortName.matches("^[a-z_\\-A-Z]*$");
       
    if (result && shortName.length()!=0) {

      ValidationResult result2 = null;

      // verifica se e' unica
      // controllo sul db che non ci siano shortname uguali
      result2 = validatorService.checkShortName(
          metadato.getObject().getClass(), metadato.getObject());
      if (!result2.isSuccess())
        errors.rejectValue("shortName", result2.getMessage());

    } else {
      errors.rejectValue("shortName",
View Full Code Here


            }

            if (cont instanceof DecoratorRPPropertiesDefinition)
            {
                DecoratorRPPropertiesDefinition decorator = (DecoratorRPPropertiesDefinition) cont;               
                result += countDynamicPublicMetadata(
                        anagrafica.getDynamicField(), decorator.getShortName(),
                        decorator.getRendering(), decorator.getReal(),
                        onlyComplexValue);
            }

        }

        if (!onlyComplexValue)
        {
            containables = new LinkedList<IContainable>();
            applicationService.findOtherContainablesInBoxByConfiguration(
                    box.getShortName(), containables);
            for (IContainable decorator : containables)
            {
                String shortName = decorator.getShortName();
                Method[] methods = anagrafica.getClass().getMethods();
                Object field = null;
                Method method = null;
                for (Method m : methods)
                {
View Full Code Here

TOP

Related Classes of org.dspace.app.cris.model.jdyna.DecoratorRPPropertiesDefinition

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.