|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.dataselectors.dataitems.BaseDataItemSelectorModel.Role
protected class BaseDataItemSelectorModel.Role
This inner class defines the functionality of a "role", which maintains a list of items associated with each role.
Field Summary |
---|
Fields inherited from interface com.sas.util.RoleInterface |
---|
NO_MAXIMUM, NO_MINIMUM |
Constructor Summary | |
---|---|
BaseDataItemSelectorModel.Role(java.lang.String name,
java.lang.String label,
java.lang.String description,
int minCount,
int maxCount)
|
Method Summary | |
---|---|
void |
addRoleItem(java.lang.Object item)
Assigns the given item to the role. |
void |
addRoleItem(java.lang.Object item,
java.util.List availableRoleItems)
Assigns the given item to the role. |
java.util.List |
addRoleItems(java.util.List items)
Assigns the given items to the role. |
java.util.List |
getAvailableRoleItems()
Returns all the items that are candidates for assignment to the role. |
java.util.List |
getDataItemReferenceList()
|
int |
getMaxRoleItemCount()
Returns the maximum number of items that can be assigned to the role. |
int |
getMinRoleItemCount()
Returns the minimum number of items that must be assigned to the role. |
java.lang.String |
getRoleClosedIcon()
|
java.lang.String |
getRoleDescription()
Returns the role's description. |
java.lang.String |
getRoleDetailedLabel()
|
java.lang.String |
getRoleDisabledIcon()
|
java.util.List |
getRoleItems()
Returns the items that have been assigned to the role. |
java.lang.String |
getRoleLabel()
Returns the role's label. |
java.lang.String |
getRoleName()
|
java.lang.String |
getRoleOpenedIcon()
|
void |
moveRoleItem(java.lang.Object item,
int offset)
|
void |
removeAllRoleItems()
Unassigns all items from the role. |
void |
removeRoleItem(java.lang.Object item)
Unassigns the given item from the role. |
void |
setRoleClosedIcon(java.lang.String iconClosed)
|
void |
setRoleDetailedLabel(java.lang.String detailedLabel)
|
void |
setRoleDisabledIcon(java.lang.String iconDisabled)
|
void |
setRoleLabel(java.lang.String label)
|
void |
setRoleOpenedIcon(java.lang.String iconOpened)
|
java.lang.String |
toString()
|
Constructor Detail |
---|
public BaseDataItemSelectorModel.Role(java.lang.String name, java.lang.String label, java.lang.String description, int minCount, int maxCount) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
Method Detail |
---|
public java.util.List getDataItemReferenceList()
public java.lang.String getRoleName()
getRoleName
in interface com.sas.util.RoleInterface
public java.lang.String getRoleLabel()
Note: implementations should return labels as localized strings.
getRoleLabel
in interface com.sas.util.RoleInterface
getRoleName()
,
getRoleDescription()
public void setRoleLabel(java.lang.String label)
public java.lang.String getRoleDetailedLabel()
getRoleDetailedLabel
in interface com.sas.util.RoleInterface
public void setRoleDetailedLabel(java.lang.String detailedLabel)
public java.lang.String getRoleDescription()
Note: implementations should return descriptions as localized strings.
getRoleDescription
in interface com.sas.util.RoleInterface
getRoleLabel()
public int getMinRoleItemCount()
getMinRoleItemCount
in interface com.sas.util.RoleInterface
NO_MINIMUM
RoleInterface.NO_MINIMUM
,
getMaxRoleItemCount()
public int getMaxRoleItemCount()
getMaxRoleItemCount
in interface com.sas.util.RoleInterface
NO_MAXIMUM
RoleInterface.NO_MAXIMUM
,
getMinRoleItemCount()
public java.lang.String getRoleOpenedIcon()
getRoleOpenedIcon
in interface com.sas.util.RoleInterface
public void setRoleOpenedIcon(java.lang.String iconOpened)
public java.lang.String getRoleClosedIcon()
getRoleClosedIcon
in interface com.sas.util.RoleInterface
public void setRoleClosedIcon(java.lang.String iconClosed)
public java.lang.String getRoleDisabledIcon()
getRoleDisabledIcon
in interface com.sas.util.RoleInterface
public void setRoleDisabledIcon(java.lang.String iconDisabled)
public java.util.List getAvailableRoleItems()
getAvailableRoleItems
in interface com.sas.util.RoleInterface
getRoleItems()
public java.util.List getRoleItems()
getRoleItems
in interface com.sas.util.RoleInterface
getAvailableRoleItems()
public void moveRoleItem(java.lang.Object item, int offset)
moveRoleItem
in interface com.sas.util.RoleInterface
public void addRoleItem(java.lang.Object item)
getAvailableRoleItems()
,getMinRoleItemCount()
, and
getMaxRoleItemCount()
. After calling caller should recall these other methods since assigning one item may make another invalid for assignment and/or otherwise change the
assignment rules.
This method will create a DataItemReference for any item that is in the InformationMap but not in the dataSelection. This is necessary for persistence of item attributes since map item
attribues cannot be changed at runtime.
addRoleItem
in interface com.sas.util.RoleInterface
item
- the item to assignaddRoleItems(java.util.List)
,
removeRoleItem(java.lang.Object)
public void addRoleItem(java.lang.Object item, java.util.List availableRoleItems)
getAvailableRoleItems()
,
getMinRoleItemCount()
, and
getMaxRoleItemCount()
.
After calling caller should recall these other methods since assigning
one item may make another invalid for assignment and/or otherwise change
the assignment rules.
This method will create a DataItemReference for any item that is in the InformationMap
but not in the dataSelection. This is necessary for persistence of item attributes since
map item attribues cannot be changed at runtime.
item
- the item to assignaddRoleItems(java.util.List)
,
removeRoleItem(java.lang.Object)
,
DataItemReference
public java.util.List addRoleItems(java.util.List items)
This is a convenience method for consecutive calls to
addRoleItem()
, but saves the caller the trouble of requerying
getAvailableRoleItems()
,
getMinRoleItemCount()
, and
getMaxRoleItemCount()
and validating the returned results
against the remaining items to be added.
addRoleItems
in interface com.sas.util.RoleInterface
items
- the items to assign
null
if all items added, otherwise a list of
the items that could not be addedaddRoleItem(java.lang.Object)
public void removeRoleItem(java.lang.Object item)
getAvailableRoleItems()
,
getMinRoleItemCount()
, and
getMaxRoleItemCount()
since unassigning
one item may make another valid for assignment and/or otherwise change
the assignment rules.
removeRoleItem
in interface com.sas.util.RoleInterface
item
- the item to unassignaddRoleItem(java.lang.Object)
,
removeAllRoleItems()
public void removeAllRoleItems()
getAvailableRoleItems()
,
getMinRoleItemCount()
, and
getMaxRoleItemCount()
since unassigning
one item may make another valid for assignment and/or otherwise change
the assignment rules.
removeAllRoleItems
in interface com.sas.util.RoleInterface
removeRoleItem(java.lang.Object)
public java.lang.String toString()
toString
in class java.lang.Object
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |