Class ConstraintUtil

    • Constructor Detail

      • ConstraintUtil

        public ConstraintUtil()
    • Method Detail

      • copy

        public static void copy​(Constraint srcC,
                                Constraint trgC)
        Copy source constraint to target. Both must be created before calling this utility.
        Parameters:
        srcC - contains constraint source.
        trgC - contains target constraint.
      • validate

        public static void validate​(Constraint c1)
                             throws ValidationException
        Validate the non-null attributes on the constraint.
        Parameters:
        c1 - contains the temporal values associated with an entity.
        Throws:
        ValidationException - on first invalid attribute found.
      • setConstraint

        public static void setConstraint​(String inputString,
                                         Constraint constraint)
        Used by DAO utilities to convert from a string with comma delimited values to fortress internal format Constraint.
        Parameters:
        inputString - contains raw data format which is comma delimited containing temporal data.
        constraint - used by internal processing to perform validations.
      • setConstraint

        public static String setConstraint​(Constraint constraint)
        Convert from fortress Constraint to comma delimited ldap format.
        Parameters:
        constraint - contains the temporal data.
        Returns:
        string containing raw data bound for ldap.
      • validateOrCopy

        public static void validateOrCopy​(Constraint srcC,
                                          Constraint trgC)
                                   throws ValidationException
        Utility is used during processing of constraint values. The rule used here is if the target constraint will accept the source constraint attribute only when not set initially. If target constraint's attribute is set, validation on the constraint will be performed.
        Parameters:
        srcC - Contains instantiated constraint with one or more attributes to be copied.
        trgC - instantiated object may contain zero or more attributes set. Copy will not be performed on set attrs.
        Throws:
        ValidationException - on first invalid attribute found.