Class Restriction

java.lang.Object
com.portal.pfc.infranet.restriction.Restriction
All Implemented Interfaces:
RestrictionConstants, Serializable, Cloneable

public class Restriction extends Object implements RestrictionConstants, Serializable, Cloneable
See Also:
  • Field Details

    • mViewRes

      protected int mViewRes
    • mChangeRes

      protected int mChangeRes
    • mRestriction

      protected String mRestriction
    • mMask

      protected String mMask
    • mLow

      protected Number mLow
    • mHigh

      protected Number mHigh
    • mInherited

      protected boolean mInherited
  • Constructor Details

    • Restriction

      public Restriction()
      Public so subclasses can create instances of themselves
  • Method Details

    • getViewRestriction

      public int getViewRestriction()
      Gets the viewable level. The value returned is yes, no, or yes-masked.
      Returns:
      VIEWABLE_NO, VIEWABLE_YES, or VIEWABLE_MASKED.
    • getChangeRestriction

      public int getChangeRestriction()
      Gets the permitted changeability. The returned permissions include yes, no, yes-within a range, or yes-one of a set of discrete values.
      Returns:
      CHANGABLE_NO, CHANGABLE_YES, CHANGABLE_RANGED, or CHANGABLE_DISCRETE.
    • getViewMask

      public String getViewMask()
      Gets the view mask, if any is required. Can be null (no mask).

      The mask string should be compared to the data character by character. Each space in the mask represents a visible character. Each non-space hides the character and should cause display of that non-space character instead. An exception to this rule is the tilde (~) character, which should hide the underlying character and not display anything in its place, essentially moving all further characters one space to the left.

      If the mask string is shorter than the target string, the mask string should be extended by spaces, for example, to show the rest of the target string.

      Returns:
      The String to use for masking the view.
    • getRangeMinimum

      public Number getRangeMinimum()
      Gets the minimum value to use for a range of indiscrete values.
      Returns:
      The minimum indiscrete value.
    • getRangeMaximum

      public Number getRangeMaximum()
      Gets the maximum value to use for a range of indiscrete values.
      Returns:
      The maximum indiscrete value.
    • getDiscreteValues

      public Object[] getDiscreteValues()
      Gets an array of allowed discrete values for the field. The object type matches the field's value type.
      Returns:
      An array of objects, each an allowed discrete value.
    • getRestrictionName

      public String getRestrictionName()
    • equals

      public boolean equals(Restriction r)
    • getInfranetType

      public int getInfranetType()
      Returns the Portal value for this restriction, one of: RestrictionConstants.INF_READ_WRITE, RestrictionConstants.INF_READ_ONLY, RestrictionConstants.INF_WRITE_ONLY, RestrictionConstants.INF_NONE,
    • setInherited

      public void setInherited(boolean b)
      Parameters:
      b -
    • isInherited

      public boolean isInherited()
      Returns:
      true if this is an inherited Restriction; false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setRestriction

      protected void setRestriction(String s)