Interface RuntimeClass

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      RWIterable<com.redwood.scheduler.api.scripting.ScriptingFunction> getBuiltInFunctions​(com.redwood.scheduler.api.model.SchedulerSession aSession)
      Returns available built in scripting functions, current session has access to
      RWIterable<com.redwood.scheduler.api.scripting.ScriptingVariable> getContextVariables​(String aMemberName)
      For given member return the variables that can be used for the SchedulerEntity this RuntimeClass represents
      String getDescription()
      Get the description of the class as it is described in the model.
      RWIterable<String> getMembers()
      Obtain all available members for the object-type
      RuntimeMemberType getMemberType​(String name)
      Obtain the type information for the given member.
      RuntimeMemberType getMemberTypeString​(String name)
      Obtain the String-specific type information for the given member of type String.
      String getObjectType()
      Returns the object type of this RuntimeClass (name of ObjectDefinition), e.g.
      RWIterable<com.redwood.scheduler.api.scripting.ScriptingFunction> getRELEntryPoints​(com.redwood.scheduler.api.model.SchedulerSession aSession)
      Return all entry points the current session has access to
      Class<? extends com.redwood.scheduler.api.model.SchedulerEntity> getRuntimeClass()
      Return the actual SchedulerEntity class for this RuntimeClass.
      boolean hasMember​(String name)
      Does the given member exist for the object-type.
      boolean isAuditable()
      Returns true if this class (object type) can be audited.
      boolean isAuditableAtLevel​(com.redwood.scheduler.api.model.enumeration.AuditLevel level)
      Returns true if this class (object type) can be audited at given level.
      boolean supportsREL​(String aMemberName)
      Returns true if given member for the SchedulerEntity this RuntimeClass represents suppors rel expressions.
    • Method Detail

      • hasMember

        boolean hasMember​(String name)
        Does the given member exist for the object-type.
        Parameters:
        name - The member name
        Returns:
        True if the member does exist
      • getMemberType

        RuntimeMemberType getMemberType​(String name)
        Obtain the type information for the given member.
        Parameters:
        name - The member name
        Returns:
        The member type information or null if the member not exist
      • getMemberTypeString

        RuntimeMemberType getMemberTypeString​(String name)
        Obtain the String-specific type information for the given member of type String.
        Parameters:
        name - The member name
        Returns:
        The member type information if it exist or null if the member either does not exist or is not of type String
      • getRuntimeClass

        Class<? extends com.redwood.scheduler.api.model.SchedulerEntity> getRuntimeClass()
        Return the actual SchedulerEntity class for this RuntimeClass. For example if this RuntimeClass represents JobDefinition, this will return JobDefinition.class (so the class of JobDefinition)
        Returns:
        SchedulerEntity class this RuntimeClass represents
      • getObjectType

        String getObjectType()
        Returns the object type of this RuntimeClass (name of ObjectDefinition), e.g. JobDefinition.
        Returns:
        Object type
      • isAuditable

        boolean isAuditable()
        Returns true if this class (object type) can be audited.
        Returns:
        True if auditable, false otherwise.
      • isAuditableAtLevel

        boolean isAuditableAtLevel​(com.redwood.scheduler.api.model.enumeration.AuditLevel level)
        Returns true if this class (object type) can be audited at given level.
        Parameters:
        level - Level of auditing
        Returns:
        True if auditable at given level, false otherwise.
      • getDescription

        String getDescription()
        Get the description of the class as it is described in the model.
        Returns:
        the description
      • getContextVariables

        RWIterable<com.redwood.scheduler.api.scripting.ScriptingVariable> getContextVariables​(String aMemberName)
        For given member return the variables that can be used for the SchedulerEntity this RuntimeClass represents
        Specified by:
        getContextVariables in interface RuntimeClassComp
        Parameters:
        aMemberName - Variable name
        Returns:
        Iterator<ScriptingVariable> (variables that can be used in a REL expression) or Empty Iterator (if aMember does not support REL).
      • supportsREL

        boolean supportsREL​(String aMemberName)
        Returns true if given member for the SchedulerEntity this RuntimeClass represents suppors rel expressions.
        Parameters:
        aMemberName -
        Returns:
        true if aMember supports REL expressions.
      • getBuiltInFunctions

        RWIterable<com.redwood.scheduler.api.scripting.ScriptingFunction> getBuiltInFunctions​(com.redwood.scheduler.api.model.SchedulerSession aSession)
        Returns available built in scripting functions, current session has access to
        Specified by:
        getBuiltInFunctions in interface RuntimeClassComp
        Parameters:
        aSession - Session to use
        Returns:
        Iterator<ScriptingVariable> with built in functions
      • getRELEntryPoints

        RWIterable<com.redwood.scheduler.api.scripting.ScriptingFunction> getRELEntryPoints​(com.redwood.scheduler.api.model.SchedulerSession aSession)
        Return all entry points the current session has access to
        Specified by:
        getRELEntryPoints in interface RuntimeClassComp
        Parameters:
        aSession - Session to use
        Returns:
        Iterator<ScriptingVariable> with functions taken from the RELEntryPoints that the user can see.