All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.dataselectors.dataitems
Interface DataItemSelectorInterface

All Superinterfaces:
  com.sas.util.RoleProviderInterface

All Known Implementing Classes:
  BaseDataItemSelectorModel, DataItemSelectorModel, DataItemSelectorModelOLAPTable, DataItemSelectorModelRelationalTable, OLAPTableRoles, TableRoles

    @SASScope(value="ALL")
    public interface DataItemSelectorInterface

extends com.sas.util.RoleProviderInterface

Defines the basic set of methods required of a model for the DataItemSelector.

Since:
  3.1

Field Summary
`static java.lang.String` | `DISPLAY_DETAIL_VALUES` Constant for the Detail query type
`static java.lang.String` | `GROUP_BY_CATEGORY_VALUES` Constant for the Group By query type

Method Summary
`abstract boolean` | `allQueryItemsAreDetailUsage()` Indicates if all items selected for each role are set to detail usage.
`abstract void` | `cleanUp(java.lang.String mode)` For each added role, removes from the business model all DataItemReference objects created during processing of the selector.
`abstract java.util.List` | `getAllAvailableNodeIds(boolean useOriginalIds)` Returns a list of the ids for all items in the available list.
`abstract java.util.List` | `getAvailableEnabledNodeIds(java.lang.String selectedRole)` Returns a list of the item ids for the items available for selection for the selected role.
`abstract java.util.List` | `getAvailableItemInfoList(java.lang.String selectedRole)` Returns a list of DataItemTreeNodeInfo objects, representing the list of items available for the selected role.
`abstract javax.swing.tree.TreeModel` | `getAvailableTreeModel(com.sas.util.transforms.TransformInterface transform, java.lang.String selectedRole)` Creates a tree model representing the available items for the business model.
`abstract java.lang.String` | `getBaseItemId(java.lang.String itemid)` Returns the base item id of the DataItemReference in the stored dataItem map identified by itemid.
`abstract java.util.Map` | `getDataItemMap()` Returns the map of DataItems stored by their id
`abstract java.lang.Object` | `getItemFromItemMap(java.lang.String itemid)` Returns the data item in the stored itemmap that corresponds to the itemid.
`abstract java.util.Locale` | `getLocale()` Returns the locale object
`abstract java.util.List` | `getMoveTargetRoles()` Returns a list of RoleInterface objects that the items contained in the selectedItems parameter can be moved to.
`abstract java.lang.String` | `getQueryType()` Returns the current query type
`abstract java.util.List` | `getSelectedItemInfoList(java.lang.String selectedRole)` Returns a list of DataItemTreeNodeInfo objects, representing the list of items assigned to the selected role.
`abstract javax.swing.tree.TreeModel` | `getSelectedTreeModel(com.sas.util.transforms.TransformInterface transform, java.lang.String selectedRole)` Creates a tree model representing the selected items for the business model.
`abstract java.lang.String` | `getStatusMessage()` Checks for basic validity/completeness of the adapter and returns a status message indicating what is wrong with the adapter.
`abstract boolean` | `isCalculatedItemSelected()` Indicates if a calculated item is selected for any of the assigned roles.
`abstract boolean` | `isItemMoveDownValid()` Returns true if the items contained in the selectedItems parameter can be moved down in the model order.
`abstract boolean` | `isItemMoveUpValid()` Returns true if the items contained in the selectedItems parameter can be moved up in the model order.
`abstract boolean` | `isThisItemAReferenceInItemMap(java.lang.String itemid)` Convenience method that indicates if the item in the stored dataitem map identified by the passed in id is a DataItemReference.
`abstract boolean` | `isThisItemInAvailableList(java.lang.String itemid, com.sas.util.RoleInterface role)` Convenience method to determine if the data item identified by the passed in item id is available for selection for the indicated role.
`abstract boolean` | `isThisItemInRoleRefList(java.lang.String itemid, com.sas.util.RoleInterface role)` Indicates if the item identified by the passed in item id is in the list of DataItemReferences created by addRoleItem for the indicated role.
`abstract boolean` | `queryItemsSupportDetailUsage()` Indicates if all items selected for each role support the detail usage.
`abstract void` | `setLocale(java.util.Locale locale)` Sets the locale object to ensure that all messages returned are properly translated.
`abstract void` | `setQueryType(java.lang.String queryType)` Sets the value for the query type for relational queries.
`abstract void` | `setSelectedItems(java.lang.String[] items)` Sets the array of selected data items.
`abstract void` | `setSelectedItemsQueryType(java.lang.String queryType)` Sets the DataItem usage for each of the selected items.

Methods inherited from interface com.sas.util.RoleProviderInterface
`getRoleItems, getRoles`

Field Detail

### GROUP_BY_CATEGORY_VALUES

    static final java.lang.String GROUP_BY_CATEGORY_VALUES

  Constant for the Group By query type

  See Also:
    Constant Field Values

### DISPLAY_DETAIL_VALUES

    static final java.lang.String DISPLAY_DETAIL_VALUES

  Constant for the Detail query type

  See Also:
    Constant Field Values

Method Detail

### getAvailableTreeModel

    javax.swing.tree.TreeModel getAvailableTreeModel(com.sas.util.transforms.TransformInterface transform,
                                                     java.lang.String selectedRole)

  Creates a tree model representing the available items for the business model. By default, the tree nodes are of type DefaultMutableTreeNode, but a transform can be passed in to transform the tree nodes to a different type.

  Parameters:
    `transform` - - an optional transform object
    `selectedRole` - - the currently selected role
  Returns:
    a TreeModel representing the available items

### getAvailableEnabledNodeIds

    java.util.List getAvailableEnabledNodeIds(java.lang.String selectedRole)

  Returns a list of the item ids for the items available for selection for the selected role.

  Parameters:
    `selectedRole` - - the currently selected role
  Returns:
    the list of available item ids

### getAllAvailableNodeIds

    java.util.List getAllAvailableNodeIds(boolean useOriginalIds)

  Returns a list of the ids for all items in the available list. Some or all of these items may not be available for selection for the selected role.

  Parameters:
    `userOriginalIds` - - if true, the list will contain the ids of the baseDataItem for each DataItemReference in the available list
  Returns:
    the list of ids for the available list

### getAvailableItemInfoList

    java.util.List getAvailableItemInfoList(java.lang.String selectedRole)

  Returns a list of DataItemTreeNodeInfo objects, representing the list of items available for the selected role.

  Parameters:
    `role` - The role of interest
  Returns:
    items The list of available items
  See Also:
    `DataItemTreeNodeInfo`

### getSelectedItemInfoList

    java.util.List getSelectedItemInfoList(java.lang.String selectedRole)

  Returns a list of DataItemTreeNodeInfo objects, representing the list of items assigned to the selected role.

  Parameters:
    `selectedRole` - The role of interest
  Returns:
    The list of available items
  See Also:
    `DataItemTreeNodeInfo`

### getSelectedTreeModel

    javax.swing.tree.TreeModel getSelectedTreeModel(com.sas.util.transforms.TransformInterface transform,
                                                    java.lang.String selectedRole)

  Creates a tree model representing the selected items for the business model. By default, the tree nodes are of type DefaultMutableTreeNode, but a transform can be passed in to transform the tree nodes to a different type.

  Parameters:
    `transform` - - an optional transform object
    `selectedRole` - - the currently selected role
  Returns:
    a TreeModel representing the selected items

### getDataItemMap

    java.util.Map getDataItemMap()

  Returns the map of DataItems stored by their id

  Returns:
    the dataitem map

### cleanUp

    void cleanUp(java.lang.String mode)

  For each added role, removes from the business model all DataItemReference objects created during processing of the selector. This is typically done when the user cancels out of the selector to restore the business model to its original state.

  Parameters:
    `mode` - - an optional mode identifier (this can be null)

### setLocale

    void setLocale(java.util.Locale locale)

  Sets the locale object to ensure that all messages returned are properly translated.

  Parameters:
    `locale` - - the locale object

### getLocale

    java.util.Locale getLocale()

  Returns the locale object

  Returns:
    the locale

### getItemFromItemMap

    java.lang.Object getItemFromItemMap(java.lang.String itemid)

  Returns the data item in the stored itemmap that corresponds to the itemid. Returns null if the item is not found in the map.

  Parameters:
    `itemid` - - the id of the item to return
  Returns:
    the item in the map corresponding to the passed in item id

### getBaseItemId

    java.lang.String getBaseItemId(java.lang.String itemid)

  Returns the base item id of the DataItemReference in the stored dataItem map identified by itemid. Null will be returned if the item is not found in the map.

  Parameters:
    `itemid` - - the id of the DataItemReference to find in the map
  Returns:
    the id of the baseDataItem of the reference corresponding to the passed in item id

### isThisItemAReferenceInItemMap

    boolean isThisItemAReferenceInItemMap(java.lang.String itemid)

  Convenience method that indicates if the item in the stored dataitem map identified by the passed in id is a DataItemReference.

  Parameters:
    `itemid` - - the id of the item to search for in the dataitem map
  Returns:
    true if an item is in the dataitem map corresponding to the passed in id and the item is a DataItemReference, otherwise false

### isThisItemInAvailableList

    boolean isThisItemInAvailableList(java.lang.String itemid,
                                      com.sas.util.RoleInterface role)

  Convenience method to determine if the data item identified by the passed in item id is available for selection for the indicated role.

  Parameters:
    `itemid` - - the id of the item in the available list
    `role` - - the role of interest
  Returns:
    true if the item was found in the available list, otherwise false

### isThisItemInRoleRefList

    boolean isThisItemInRoleRefList(java.lang.String itemid,
                                    com.sas.util.RoleInterface role)

  Indicates if the item identified by the passed in item id is in the list of DataItemReferences created by addRoleItem for the indicated role.

  Parameters:
    `itemid` - - the id of the DataItem
    `role` - - the role of interest
  Returns:
    true if the item is in the role available list, otherwise false

### isCalculatedItemSelected

    boolean isCalculatedItemSelected()

  Indicates if a calculated item is selected for any of the assigned roles.

  Returns:
    true if a calculated item is selected

### queryItemsSupportDetailUsage

    boolean queryItemsSupportDetailUsage()

  Indicates if all items selected for each role support the detail usage.

  Returns:
    true if every selected item supports detail
  See Also:
    `DataItemActionType`

### allQueryItemsAreDetailUsage

    boolean allQueryItemsAreDetailUsage()

  Indicates if all items selected for each role are set to detail usage.

  Returns:
    true if every selected item is set to detail usage
  See Also:
    `DataItemActionType`

### setSelectedItemsQueryType

    void setSelectedItemsQueryType(java.lang.String queryType)

  Sets the DataItem usage for each of the selected items. If the queryType is "group", the usage for each dataitem is set to DataItemActionType.USAGE_CATEGORY. If the queryType is "detail", the usage for each dataitem is set to DataitemActionType.USAGE_DETAIL. This is only used for relational queries, and provides the functionality to create a detail query or a query that is grouped by certain data items.

  Parameters:
    `queryType` - - The query type string. This should be "group" or "detail".
  See Also:
    `DataItemActionType`

### setQueryType

    void setQueryType(java.lang.String queryType)

  Sets the value for the query type for relational queries.

  Parameters:
    `role` - The query type

### getQueryType

    java.lang.String getQueryType()

  Returns the current query type

  Returns:
    The current query type

### isItemMoveUpValid

    boolean isItemMoveUpValid()

  Returns true if the items contained in the selectedItems parameter can be moved up in the model order.

  Returns:
    True if items can move up, otherwise false

### isItemMoveDownValid

    boolean isItemMoveDownValid()

  Returns true if the items contained in the selectedItems parameter can be moved down in the model order.

  Returns:
    True if items can move down, otherwise false

### getStatusMessage

    java.lang.String getStatusMessage()

  Checks for basic validity/completeness of the adapter and returns a status message indicating what is wrong with the adapter. If the adapter contains complete or valid data that can be applied to the model, a null string is returned.

  Returns:
    The adapter status message

### getMoveTargetRoles

    java.util.List getMoveTargetRoles()

  Returns a list of RoleInterface objects that the items contained in the selectedItems parameter can be moved to.

  Returns:
    The list of roles the items can move to

### setSelectedItems

    void setSelectedItems(java.lang.String[] items)

  Sets the array of selected data items.

  Parameters:
    `items` - The array of selected items

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.