public class Restriction extends Object implements RestrictionConstants, Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
protected int |
mChangeRes |
protected Number |
mHigh |
protected boolean |
mInherited |
protected Number |
mLow |
protected String |
mMask |
protected String |
mRestriction |
protected int |
mViewRes |
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 and Description |
---|
Restriction()
Public so subclasses can create instances of themselves
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Restriction r) |
int |
getChangeRestriction()
Gets the permitted changeability.
|
Object[] |
getDiscreteValues()
Gets an array of allowed discrete values for the field.
|
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,
|
Number |
getRangeMaximum()
Gets the maximum value to use for a range of indiscrete values.
|
Number |
getRangeMinimum()
Gets the minimum value to use for a range of indiscrete values.
|
String |
getRestrictionName() |
String |
getViewMask()
Gets the view mask, if any is required.
|
int |
getViewRestriction()
Gets the viewable level.
|
boolean |
isInherited() |
void |
setInherited(boolean b) |
protected void |
setRestriction(String s) |
String |
toString() |
protected int mViewRes
protected int mChangeRes
protected String mRestriction
protected String mMask
protected Number mLow
protected Number mHigh
protected boolean mInherited
public Restriction()
public int getViewRestriction()
public int getChangeRestriction()
public String getViewMask()
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.
String
to use for masking the view.public Number getRangeMinimum()
public Number getRangeMaximum()
public Object[] getDiscreteValues()
public String getRestrictionName()
public boolean equals(Restriction r)
public int getInfranetType()
public void setInherited(boolean b)
b
- public boolean isInherited()
protected void setRestriction(String s)
Copyright © 2003, 2023, Oracle and/or its affiliates.