|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.commands.dataselectors.DataItemSelectorCommand
public class DataItemSelectorCommand
This class is responsible for assisting in the processing of user actions through a user-interface representation of a Query selector. When the selector is initially displayed, the show method creates the selector model and sets it on the selector for data retrieval. During selector processing of user interactions, the process method updates the selector model. The commit method commits all user selections to the business model represented by the selector model, and the cancel method removes all changes made by the user.
Field Summary | |
---|---|
protected java.lang.String |
action
The user remote javascripting action. |
static java.lang.String |
CANCEL_MODE
The mode key for cancelling all selector actions |
static java.lang.String |
CHANGE_QUERY_TYPE
Remote scripting action key that indicates the value for the query type changed |
static java.lang.String |
CHANGE_ROLE
Remote scripting action key that indicates the selected role changed |
static java.lang.String |
COMMIT
Remote scripting action key that indicates the OK button was clicked |
static java.lang.String |
COMMIT_MODE
The mode key for committing changes to the viewer model |
protected java.lang.String |
data
The selector data for a remote javascript action. |
static java.lang.String |
ENABLE_BUTTONS
|
protected java.lang.Object |
model
The data model of the viewer |
static java.lang.String |
MOVE_ITEM_DOWN
Remote scripting action key that indicates the down arrow was clicked to move an item down |
static java.lang.String |
MOVE_ITEM_UP
Remote scripting action key that indicates the up arrow was clicked to move an item up |
static java.lang.String |
MOVE_ITEMS
Remote scripting action key that indicates the Move Item button was clicked |
static java.lang.String |
PROCESS_MODE
The mode key for interacting with the selector |
protected java.lang.String |
queryType
The query type value |
protected java.lang.String |
role
The selected role value |
protected java.lang.String[] |
selectedIndexes
|
protected java.lang.String[] |
selectedItems
Array of data items that have been selected for the selected role |
protected DataItemSelectorInterface |
selectorModel
The selector data model. |
static java.lang.String |
SHOW_MODE
The mode key for initially displaying the selector |
static java.lang.String |
SORT_ITEMS
Remote scripting action key that indicates the available tree display format changed |
protected java.lang.String[] |
unselectedItems
Array of data items that have been removed from the selected role |
static java.lang.String |
UPDATE_ITEMS
Remote scripting action key that indicates an add or delete of a data item occurred |
Fields inherited from class com.sas.commands.dataselectors.BaseSelectorCommand |
---|
complete, contentsChanged, eventInfo, eventSource, modal, selector |
Fields inherited from interface com.sas.commands.DynamicAttributeCommandInterface |
---|
COMMAND_NAME_PREFIX |
Constructor Summary | |
---|---|
DataItemSelectorCommand()
Default constructor |
|
DataItemSelectorCommand(java.lang.String name)
Constructor that accepts a command name |
|
DataItemSelectorCommand(java.lang.String name,
java.lang.String actionClass)
Constructor that accepts a command name and an action class type |
Method Summary | |
---|---|
void |
cancel(java.lang.Object o)
Cancel is called when the user clicks on the cancel button on the selector or another selector becomes active. |
protected void |
commit(java.lang.Object o)
Commits all changes made to the selector model to the viewer's business model. |
static DataItemSelectorModel |
createRoleProvider(com.sas.iquery.metadata.business.BusinessQuery query)
Creates the dataitem selector model from the BusinessQuery. |
protected com.sas.util.RoleInterface |
findRoleForItem(java.lang.Object thisitem)
|
java.lang.String |
getAction()
Returns the user action string. |
java.lang.String |
getData()
Returns the user data string. |
java.lang.String |
getQueryType()
Returns the current query type |
java.lang.String |
getRole()
Returns the current working role |
java.lang.String[] |
getSelectedIndexes()
|
java.lang.String[] |
getSelectedItems()
Returns the array of selected data items |
java.lang.String[] |
getUnselectedItems()
Returns the array of unselected data items |
protected boolean |
isMeasure(java.lang.Object item)
|
boolean |
isSupported(ActionSupportFilter actionFilter)
Returns a boolean indicating whether the command is supported for the area specified on the ActionSupportFilter argument. |
protected void |
moveItemsToRole(java.util.List items,
com.sas.util.RoleInterface targetRole)
|
protected void |
process(java.lang.Object o)
Performs processing to update the selector model as the user makes selections in the user interface. |
void |
setAction(java.lang.String actionstr)
Sets the user action string. |
void |
setData(java.lang.String datastr)
Sets the data string associated with the user action. |
void |
setQueryType(java.lang.String queryType)
Sets the value for the query type for relational queries. |
void |
setRole(java.lang.String role)
Sets the value for the current working role. |
void |
setSelectedIndexes(java.lang.String[] indexes)
|
void |
setSelectedItems(java.lang.String[] items)
Sets the array of selected data items. |
void |
setUnselectedItems(java.lang.String[] items)
Sets the array of unselected data items. |
protected void |
setUsageOnResultItems(java.util.List itemlist,
java.lang.String querytype)
Sets the usage property of each data item in Itemlist to the value corresponding to the querytype key. |
protected void |
show(java.lang.Object o)
Creates the selector model and sets it on the selector. |
Methods inherited from class com.sas.commands.dataselectors.BaseSelectorCommand |
---|
cancel, closeSelector, execute, getEventInfo, getEventSource, getMode, getModel, getSelector, getSelectorModel, isComplete, isContentsChanged, isModal, setComplete, setModal, setMode, setModel, setSelector, setSelectorModel |
Methods inherited from class com.sas.commands.BaseCommand |
---|
getLocale, getName, getNextCommandName, getText, isExecutable, isUndoable, setLocale, setName, setText, undo |
Methods inherited from class com.sas.entities.BaseEntity |
---|
clone, containsAttributeNamed, equals, equals, getAttribute, getAttribute, getAttributeCount, getAttributes, getEntityKey, getPropertyDescriptors, getStringAttribute, listAttributeNames, removeAllAttributes, removeAttribute, reset, sameEntity, setAttribute, setAttributes, setEntityKey, toString |
Methods inherited from interface com.sas.entities.BaseEntityValueInterface |
---|
getAttribute, setAttribute |
Methods inherited from interface com.sas.util.Command |
---|
clone |
Field Detail |
---|
protected java.lang.Object model
protected DataItemSelectorInterface selectorModel
protected java.lang.String action
UPDATE_ITEMS
,
SORT_ITEMS
,
MOVE_ITEMS
,
CHANGE_ROLE
,
MOVE_ITEM_UP
,
MOVE_ITEM_DOWN
,
CHANGE_QUERY_TYPE
,
COMMIT
protected java.lang.String data
public static final java.lang.String SHOW_MODE
public static final java.lang.String PROCESS_MODE
public static final java.lang.String CANCEL_MODE
public static final java.lang.String COMMIT_MODE
public static final java.lang.String UPDATE_ITEMS
public static final java.lang.String SORT_ITEMS
public static final java.lang.String MOVE_ITEMS
public static final java.lang.String CHANGE_ROLE
public static final java.lang.String MOVE_ITEM_UP
public static final java.lang.String MOVE_ITEM_DOWN
public static final java.lang.String CHANGE_QUERY_TYPE
public static final java.lang.String ENABLE_BUTTONS
public static final java.lang.String COMMIT
protected java.lang.String[] selectedItems
protected java.lang.String[] unselectedItems
protected java.lang.String[] selectedIndexes
protected java.lang.String role
protected java.lang.String queryType
Constructor Detail |
---|
public DataItemSelectorCommand()
public DataItemSelectorCommand(java.lang.String name)
public DataItemSelectorCommand(java.lang.String name, java.lang.String actionClass)
Method Detail |
---|
protected void show(java.lang.Object o)
show
in class BaseSelectorCommand
protected void process(java.lang.Object o)
process
in class BaseSelectorCommand
protected void moveItemsToRole(java.util.List items, com.sas.util.RoleInterface targetRole)
public void cancel(java.lang.Object o)
cancel
in class BaseSelectorCommand
protected void commit(java.lang.Object o) throws java.io.IOException
commit
in class BaseSelectorCommand
java.io.IOException
BusinessQuery
,
BusinessModel
protected void setUsageOnResultItems(java.util.List itemlist, java.lang.String querytype)
If querytype is... | Item usage is... |
detail | DataItemActionType.USAGE_DETAIL |
group AND item is a DataItemReference | usage of item's baseDataItem |
group AND item is not a DataItemReference | DataItemActionType.USAGE_CATEGORY if supported |
otherwise, DataItemActionType.USAGE_AGGREGATE |
itemlist
- - the list of data itemsquerytype
- - the query type keycom.sas.dataselectors.dataitems.DataItemSelectorInferface
,
DataItem
,
DataItemActionType
public static DataItemSelectorModel createRoleProvider(com.sas.iquery.metadata.business.BusinessQuery query) throws com.sas.iquery.metadata.MetadataException
query
- - the current business query
com.sas.iquery.metadata.MetadataException
public boolean isSupported(ActionSupportFilter actionFilter)
isSupported
in interface CommandSupportedInterface
actionFilter
- - the object that describes the current area.
BaseAction.setReturnStatus(int)
protected boolean isMeasure(java.lang.Object item)
public void setRole(java.lang.String role)
role
- The current rolepublic java.lang.String getRole()
public void setSelectedItems(java.lang.String[] items)
items
- The array of selected itemspublic java.lang.String[] getSelectedItems()
public void setSelectedIndexes(java.lang.String[] indexes)
public java.lang.String[] getSelectedIndexes()
public void setUnselectedItems(java.lang.String[] items)
items
- The array of unselected itemspublic java.lang.String[] getUnselectedItems()
public void setAction(java.lang.String actionstr)
actionstring
- The user actionpublic java.lang.String getAction()
public void setData(java.lang.String datastr)
data
- The user data stringpublic java.lang.String getData()
public void setQueryType(java.lang.String queryType)
role
- The query typepublic java.lang.String getQueryType()
protected com.sas.util.RoleInterface findRoleForItem(java.lang.Object thisitem)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |