Class DefaultMethodContribution

java.lang.Object
ch.tocco.nice2.scripting.impl.groovy.security.DefaultMethodContribution
All Implemented Interfaces:
AllowedMethodContribution

@Component public class DefaultMethodContribution extends Object implements AllowedMethodContribution
Allows access to some basic methods that are useful (and harmless) for all scripts. Also allows property access to all fields and relations of an entity.
  • Constructor Details

    • DefaultMethodContribution

      public DefaultMethodContribution(DataModel dataModel)
  • Method Details

    • acceptMethod

      public boolean acceptMethod(Class<?> type, String methodName)
      Specified by:
      acceptMethod in interface AllowedMethodContribution
      Parameters:
      type - the declaring class
      methodName - the name of the method
      Returns:
      whether this method call should be allowed in groovy scripts