Interface PeriodFunction

    • Method Detail

      • getClassname

        String getClassname()
        Get the value for Classname. (The class that implements the PeriodFunction.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getParameterComment

        String getParameterComment()
        Get the value for ParameterComment. (Comment describing parameters and legal values)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getParameterDefaults

        String getParameterDefaults()
        Get the value for ParameterDefaults. ( Default values for parameters for period functions. These values will be used to prefill the control when the period function is selected. Parameters are represented with one line per parameter, of the form parameter-name = value. )
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getValidity

        Validity getValidity()
        Get the value for Validity. (Is this definition valid? That is, can this definition currently be used?) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setClassname

        void setClassname​(String newClassname)
        Set the value for Classname. (The class that implements the PeriodFunction.) This value is optional.
        Parameters:
        newClassname - the new value for Classname.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setParameterComment

        void setParameterComment​(String newParameterComment)
        Set the value for ParameterComment. (Comment describing parameters and legal values) This value is optional.
        Parameters:
        newParameterComment - the new value for ParameterComment.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setParameterDefaults

        void setParameterDefaults​(String newParameterDefaults)
        Set the value for ParameterDefaults. ( Default values for parameters for period functions. These values will be used to prefill the control when the period function is selected. Parameters are represented with one line per parameter, of the form parameter-name = value. ) This value is optional.
        Parameters:
        newParameterDefaults - the new value for ParameterDefaults.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • allStatusChanges

        List<Period> allStatusChanges​(DateTimeZone startTime,
                                      DateTimeZone endTime,
                                      TimeZone timeZone,
                                      String params)
        All changes of the open-close status of this period function. Returns all status changes of the interval in the period AFTER startTime and BEFORE endTime.
        Parameters:
        startTime - Starting time stamp
        endTime - Ending time stamp
        timeZone - The TimeZone to use for startTime and endTime.
        params - Period function parameters, represented by a string of Java properties, read-only.
        Returns:
        Sorted list with status changes between (startTime, endTime)
      • isOpen

        boolean isOpen​(DateTimeZone atTime,
                       TimeZone timeZone,
                       String params)
        Returns status of this period function at timestamp atTime
        Parameters:
        atTime - As of what date
        timeZone - The TimeZone to use.
        params - Period function parameters, represented by a string of Java properties, read-only.
        Returns:
        Is open?
      • validate

        void validate​(String params)
        Throws runtime exception if the parameters are not valid for this period function.
        Parameters:
        params - Period function parameters, represented by a string of Java properties, read-only.
      • setLibrary

        void setLibrary​(Library newLibrary)
        Set the value for Library. This value is optional.
        Parameters:
        newLibrary - is the object to set Library to. The library that the PeriodFunction depends upon.
      • checkCreatePrivilege

        RequiredPermission checkCreatePrivilege()
        Check whether or not the create action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkViewPrivilege

        RequiredPermission checkViewPrivilege()
        Check whether or not the view action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkEditPrivilege

        RequiredPermission checkEditPrivilege()
        Check whether or not the edit action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkDeletePrivilege

        RequiredPermission checkDeletePrivilege()
        Check whether or not the delete action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.