Class Restriction
java.lang.Object
com.portal.pfc.infranet.restriction.Restriction
- All Implemented Interfaces:
RestrictionConstants
,Serializable
,Cloneable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected Number
protected boolean
protected Number
protected String
protected String
protected int
Fields inherited from interface com.portal.pfc.infranet.restriction.RestrictionConstants
CHANGABLE_DISCRETE, CHANGABLE_NDISCRETE, CHANGABLE_NO, CHANGABLE_RANGED, CHANGABLE_YES, INF_NONE, INF_READ_ONLY, INF_READ_WRITE, INF_WRITE_ONLY, VIEWABLE_MASKED, VIEWABLE_NO, VIEWABLE_YES, XML_NONE, XML_READ_ONLY, XML_READ_WRITE, XML_WRITE_ONLY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Gets the permitted changeability.Object[]
Gets an array of allowed discrete values for the field.int
Returns the Portal value for this restriction, one of: RestrictionConstants.INF_READ_WRITE, RestrictionConstants.INF_READ_ONLY, RestrictionConstants.INF_WRITE_ONLY, RestrictionConstants.INF_NONE,Gets the maximum value to use for a range of indiscrete values.Gets the minimum value to use for a range of indiscrete values.Gets the view mask, if any is required.int
Gets the viewable level.boolean
void
setInherited
(boolean b) protected void
toString()
-
Field Details
-
mViewRes
protected int mViewRes -
mChangeRes
protected int mChangeRes -
mRestriction
-
mMask
-
mLow
-
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
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
Gets the minimum value to use for a range of indiscrete values.- Returns:
- The minimum indiscrete value.
-
getRangeMaximum
Gets the maximum value to use for a range of indiscrete values.- Returns:
- The maximum indiscrete value.
-
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
-
equals
-
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
-
setRestriction
-