|
SAP NetWeaver 7.30 (SP02) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IUWLItemManager
The IUWLItemManager class provides functionality regarding retrieval and execution of Itemss.
Methods in this class contain retrieving Items, their attachments, sorting or filtering them and performing Actions
on them.
A handle to IUWLItemManager is got by calling IUWLService.getItemManager() method.
Implementation of this interface is thread safe.
Usually many of the ItemManager methods need connection to the back end, for example getting the
attachments or Description for the item. For performance reasons very first time when the user loads the
UWL, client of UWL Service could optionally set uwlContext.setAllowBackEndConnections(false)
and this forces UWL to take everything from cache for that method invocation and not to initiate any
back end connections.
IUWLService,
QueryProperties,
QueryResult.isPossiblyOutDated(),
UWLContext.isBackEndConnectionsAllowed()| Method Summary | |
|---|---|
Map |
fillDynamicProperties(UWLContext context,
Item item,
Map mapOfDynamicProperties)
Fills dynamic properties for actions - needed for object link visualization |
ItemCollection |
filterItems(UWLContext context,
ItemCollection items,
CompoundExpression filter)
Filters items based upon the filter passed. |
Action |
getActionForItem(UWLContext ctx,
Item item,
String actionName)
Searches for the action in the the configuration. |
Action |
getActionForItem(UWLContext ctx,
long itemId,
String actionName)
Looks in the configuration whether action is defined. |
IActionHandler |
getActionHandler(String handlerId)
Look up registered action handler by its id. |
Map |
getActionProperties(UWLContext context,
Item item,
Action action,
Map actionProperties,
boolean needsItemValidation)
This method should be called only if Action is registered with the UI. |
String |
getActionUrl(UWLContext context,
Item item,
Action action,
Map actionProperties)
This method should be called only if isActionLaunchable() returs true. |
String |
getActionUrl(UWLContext context,
long[] itemIds,
String action)
Method that could be called to get one single url for launching multiple items. |
String |
getActionUrl(UWLContext context,
long item,
String action)
This method should be called only if isActionLaunchable() returs true. |
Map |
getAllActionsForItem(UWLContext context,
Item item)
Returns all the possible actions on that item, taken from the configuration and the provider connector itself. |
Attachment[] |
getAttachmentHeaders(UWLContext context,
Item item)
Retreives the attachment headers for this item. |
Action |
getDefaultActionForItem(UWLContext ctx,
Item item)
Searches in the configuration for default action defined for the Item's Itemtype. |
List |
getDistinctAttributeValuesForView(UWLContext ctx,
UWLView view,
QueryProperties qp,
CompoundExpression filter,
String atttributeId)
Method to get all the distinct values for a specified attribute Id. |
WorkLog |
getHistoryForItem(UWLContext context,
Item item)
Return the history log data of the item, retrieved from the provider connector. |
Item |
getItemByExternalId(UWLContext context,
String connectorId,
String systemId,
String externalId)
|
Item |
getItemByUwlId(UWLContext context,
long uwlId)
Same as getItemByUwlId(context,uwlId,true,true) |
Item |
getItemByUwlId(UWLContext context,
long uwlId,
boolean fillAllAttributes,
boolean fillDescription,
boolean fillAttachmentHeaders)
Method to retrieve an item. |
QueryResult |
getItems(UWLContext context,
QueryProperties queryProps,
CompoundExpression filter)
Method to retrieve Items. |
QueryResult |
getItemsForItemType(UWLContext context,
String itemType,
QueryProperties queryProps,
CompoundExpression viewFilter)
Method to retrieve Items for a particular item type passed.If returned items are not fully uptodate, isPossiblyOutDated()
on the result return true. |
QueryResult |
getItemsForView(UWLContext context,
UWLView view,
QueryProperties queryProps,
CompoundExpression filter)
Method to retrieve Items for a particular View.If returned items are not fully uptodate, isPossiblyOutDated()
on the result return true. |
String |
getItemTypeForItem(UWLContext context,
long itemId)
Finds item type for the item identified by itemId. |
ItemTypeCount[] |
getItemTypesBySize(UWLContext ctx,
String configurationGroup,
String substitutedUser)
Returns most popular item types and their count. |
Attachment |
getPopulatedAttachment(UWLContext context,
long itemId,
String internalAttachmentId)
Locates an attachment identified by the internalAttachmentId for the item and populates it and returns. |
Item |
getSubProcessTrackingItem(UWLContext context,
Item parentItem)
Retrieves the sub process tracking item. |
Set |
getSubstitutedForUsersWithItems(UWLContext ctx,
String itemType)
Returns only those user ids for which the current user has substitued and has items for them. |
int[] |
getTotalAndEmphasizedItemCountForView(UWLContext context,
UWLView view,
String configurationGroup,
String substitutedUser)
Returns items that need to be emphasized and total items in a particular View. |
boolean |
isActionLaunchable(UWLContext context,
Item item,
Action action)
Finds if action passed for the item is of launchable type. |
ProviderStatus |
performAction(UWLContext context,
Item item,
Action action,
Map actionProperties)
Call this method if and only if isActionLaunchable() returns false. |
ProviderStatus |
performAction(UWLContext context,
Item item,
String action)
Performs action on the item passed. |
ProviderStatus[] |
performAction(UWLContext context,
long[] itemKeys,
String action,
Map actionProperties)
Performs action on all the items whose keys are passed. |
ProviderStatus |
performAction(UWLContext context,
long itemId,
Action action,
Map actionProperties)
Call this method if and only if isActionLaunchable() returns false. |
ProviderStatus |
performAction(UWLContext context,
String externalItemId,
String systemId,
String connector,
String action,
Map actionProperties)
Call this method if and only if isActionLaunchable() returns false. |
void |
populateAttachmentContent(UWLContext context,
Item item,
Attachment hollowAttachment)
Fills the content of the hollowAttachment depending upon the attachment type. |
void |
populateAttachmentContents(UWLContext context,
Item item,
Attachment[] hollowAttachments)
Fills the content of the hollowAttachments depending upon the attachment type. |
Item |
refreshAndGetItemByUwlId(UWLContext context,
long uwlId)
This method refreshes the item from the backend and returns it. |
QueryResult |
refreshCacheAndGetItems(UWLContext context,
UWLView view,
QueryProperties queryProps,
CompoundExpression viewFilter)
Connects to all providerConnectors and gets items from them. |
QueryResult |
search(UWLContext context,
String textToSearch,
UWLView view,
QueryProperties queryProps,
CompoundExpression filter)
Search in the cache for items matching the text. |
void |
sortItems(UWLContext context,
ItemCollection items,
String[] sortKeys,
boolean[] sortOrder)
Method to explicitly sort the items based on the sort fields and the order passed. |
| Method Detail |
|---|
QueryResult getItems(UWLContext context,
QueryProperties queryProps,
CompoundExpression filter)
throws UWLException
isPossiblyOutDated()
on the result return true. In such a situation, this method needs to be called again if possibly through a timer set for
few seconds to get the updated items. If end user needs recent items another option is to call refreshCacheAndGetItems() however
that comes with the performance penalty since connections need to made to the provider systems.
context - , required, not null. Should have the valid portalRequest
set inside it.queryProps, - contains the number of records needed. Can also
specify the sort order.filter, - specifies the filter to apply on the items. If specified
over rides the view's filter.
getItemByUwlId() method.
UWLException - if items could not be retreived.QueryResult.isPossiblyOutDated(),
UWLContext.isBackEndConnectionsAllowed()
QueryResult getItemsForView(UWLContext context,
UWLView view,
QueryProperties queryProps,
CompoundExpression filter)
throws UWLException
isPossiblyOutDated()
on the result return true. In such a situation, this method needs to be called again if possibly through a timer set for
few seconds to get the updated items. If end user needs recent items another option is to call refreshCacheAndGetItems() however
that comes with the performance penalty since connections need to made to the provider systems.
context - , required, not null.view, - specifies what all item types be retreived. A view can
contain many item types. Filter present in view is applied on the items. However if there is
an explicit filter specified thro filter parameter then it has precedence over
view's default filter.queryProps, - contains the number of records needed. Can also
specify the sort order.filter, - specifies the filter to apply on the items. If specified
over rides the view's filter
getItemByUwlId() method.
UWLException - if items could not be retreived.QueryResult.isPossiblyOutDated(),
UWLContext.isBackEndConnectionsAllowed()
QueryResult getItemsForItemType(UWLContext context,
String itemType,
QueryProperties queryProps,
CompoundExpression viewFilter)
throws UWLException
isPossiblyOutDated()
on the result return true.
context - , required, not null. Should have the valid portalRequest
set inside it.itemType, - if * or null is specified, then all item types are got.queryProps, - contains the number of records needed. Can also
specify the sort order.filter, - specifies the filter to apply on the items. If specified
over rides the view's filter
getItemByUwlId() method.
UWLException - if items could not be retreived.QueryResult.isPossiblyOutDated(),
UWLContext.isBackEndConnectionsAllowed()
QueryResult refreshCacheAndGetItems(UWLContext context,
UWLView view,
QueryProperties queryProps,
CompoundExpression viewFilter)
throws UWLException
context - , required, not null. Should have the valid portalRequest
set inside it.queryProps, - contains the number of records needed. Can also
specify the sort order.filter, - specifies the filter to apply on the items. If specified
over rides the view's filterview, - specifies what all item types be retreived. A view can
contain many item types. Filter present in view is applied. However if there is
an explicit filter specified thro filter parameter then it has precedence over
view's default filter.
getItemByUwlId() method.
UWLException - if items could not be retreived.
ItemCollection filterItems(UWLContext context,
ItemCollection items,
CompoundExpression filter)
throws UWLException
getItems()methods.
context - items, - not nullfilter, - not null
UWLException - if session is invalid.
QueryResult search(UWLContext context,
String textToSearch,
UWLView view,
QueryProperties queryProps,
CompoundExpression filter)
throws UWLException
context - text - text to search for, no regular expressions are allowed.filter, - if not null is applied on the searched items.view, - look for items belonging only to this view.
UWLException
void sortItems(UWLContext context,
ItemCollection items,
String[] sortKeys,
boolean[] sortOrder)
throws UWLException
Item
documentation.
It is more performant to sort while getting items itself by passing
the sort information thro QueryProperties.
context - items - sortKeys - see Item for valid sort keys.sortOrder - every entry corresponding to sortKey, if true ascending, else descending.
UWLException
int[] getTotalAndEmphasizedItemCountForView(UWLContext context,
UWLView view,
String configurationGroup,
String substitutedUser)
throws UWLException
If cache is invalid for at least one of the item types contained in the view passed, return values contain -1,-1 respectively. This method doesnt make connections to the ProviderConnectors for performance reasons.
context - configurationGroup - optionalsubstitutedUser - optional. If null ignored. If set to current user, only current users
count is returned, if set to a substituted users, only items for this count is returned.view - not null, contains metadata on emphasized mode.
UWLException - if there is any database related error.UWLView.setEmphasizedItems(java.lang.String),
QueryProperties.setSubstitutedUser(java.lang.String)
ItemTypeCount[] getItemTypesBySize(UWLContext ctx,
String configurationGroup,
String substitutedUser)
throws UWLException
ctx - configurationGroup - optionalsubstitutedUser - optional. If null ignored. If set to current user, only current users
count is returned, if set to a substituted users, only items for this count is returned.
UWLException - if there is any errorQueryProperties.setSubstitutedUser(java.lang.String),
ItemType
Set getSubstitutedForUsersWithItems(UWLContext ctx,
String itemType)
throws UWLException
ctx - not nullitemType - could be null. Use this to restrict to particular item type. If not
specified all item types are considered.
UWLException - if there are system problems.IUser,
QueryProperties.setSubstitutedUser(java.lang.String),
QueryResult.getSubstitutingUsers()
Attachment[] getAttachmentHeaders(UWLContext context,
Item item)
throws UWLException
context - not nullitem - not null
populateAttachmentContent to fill the content
of an attachment. This return value is not null.
UWLExceptionpopulateAttachmentContent(com.sap.netweaver.bc.uwl.UWLContext, com.sap.netweaver.bc.uwl.Item, com.sap.netweaver.bc.uwl.Attachment)
void populateAttachmentContent(UWLContext context,
Item item,
Attachment hollowAttachment)
throws UWLException
context - item - hollowAttachment - not null
UWLExceptionAttachment
void populateAttachmentContents(UWLContext context,
Item item,
Attachment[] hollowAttachments)
throws UWLException
context - item - hollowAttachments -
UWLException
Attachment getPopulatedAttachment(UWLContext context,
long itemId,
String internalAttachmentId)
throws UWLException
context - requrieditemId - identifier of the item that owns the attachmentinternalAttachmentId - should match the attachment.getInternalId()
UWLException
Item getItemByUwlId(UWLContext context,
long uwlId,
boolean fillAllAttributes,
boolean fillDescription,
boolean fillAttachmentHeaders)
throws UWLException
context - uwlId - fillAttachmentHeaders - fillAllAttributes, - if true desciption and custom attributes are filled.
UWLException - if no item is found
Item getItemByExternalId(UWLContext context,
String connectorId,
String systemId,
String externalId)
throws UWLException
context - needed. Contains Users informationconnectorId - needed. Specifies the Connector which fetched the itemsystemId - system to which the item belogsexternalId - identifier of the item in the sytem
UWLException
Item getSubProcessTrackingItem(UWLContext context,
Item parentItem)
throws UWLException
UWLException - in case of errors.
Item getItemByUwlId(UWLContext context,
long uwlId)
throws UWLException
getItemByUwlId(context,uwlId,true,true)
UWLException
Item refreshAndGetItemByUwlId(UWLContext context,
long uwlId)
throws UWLException
context - not nulluwlId -
UWLException - if item is not found
String getItemTypeForItem(UWLContext context,
long itemId)
throws UWLException
context - requireduwlId - required
UWLException - if item is not found
ProviderStatus[] performAction(UWLContext context,
long[] itemKeys,
String action,
Map actionProperties)
throws UWLException
context - not nullitemKeys, - item ids.action - required, not nullactionProperties, - optional if client has filled any of actions
UWLException
ProviderStatus performAction(UWLContext context,
Item item,
String action)
throws UWLException
context - item - not nullaction - not null
UWLException
ProviderStatus performAction(UWLContext context,
long itemId,
Action action,
Map actionProperties)
throws UWLException
isActionLaunchable() returns false.
context - item - action - actionProperties, - could be null. Only if client wants to pass
some properties (like user selection etc..,used.)
UWLException
ProviderStatus performAction(UWLContext context,
Item item,
Action action,
Map actionProperties)
throws UWLException
isActionLaunchable() returns false.
context - item - action - actionProperties -
UWLException
ProviderStatus performAction(UWLContext context,
String externalItemId,
String systemId,
String connector,
String action,
Map actionProperties)
throws UWLException
isActionLaunchable() returns false.
context - externalItemId - systemId - connector - action - actionProperties -
UWLException
IActionHandler getActionHandler(String handlerId)
throws UWLException
handlerId - id of the action handler. See Action class.
UWLException - Thrown if not foundIActionHandler,
Action
String getActionUrl(UWLContext context,
Item item,
Action action,
Map actionProperties)
throws UWLException
isActionLaunchable() returs true.
context - not nullitem - neededaction - not nullactionProperties, - client could fill some dynamic properties... could be null
UWLException
String getActionUrl(UWLContext context,
long[] itemIds,
String action)
throws UWLException
IMultiItemLaucher interface.
context - neededitemIds - neededaction - needed
UWLExceptionIMultiItemLauncher
String getActionUrl(UWLContext context,
long item,
String action)
throws UWLException
isActionLaunchable() returs true.
context - not nullitem - identifier for the itemaction - action name for which URL is to be launched.
UWLException - in case of system problems or if Item is not found
Map getActionProperties(UWLContext context,
Item item,
Action action,
Map actionProperties,
boolean needsItemValidation)
throws UWLException
context - not nullitem - neededaction - not nullactionProperties, - client could fill some dynamic properties... could be nullneedsItemValidation - - flag indicating that the item passed has to be validated
UWLException
boolean isActionLaunchable(UWLContext context,
Item item,
Action action)
throws UWLException
Action) documentation.
context - item - not nullaction - not null
UWLExceptionIActionHandler
Action getActionForItem(UWLContext ctx,
Item item,
String actionName)
throws UWLException
item - not nullactionName - not null
UWLException
Action getDefaultActionForItem(UWLContext ctx,
Item item)
throws UWLException
item - not nullactionName - not null
UWLExceptionItemType.getDefaultAction()
Action getActionForItem(UWLContext ctx,
long itemId,
String actionName)
throws UWLException
ctx - itemId - actionName -
UWLException
Map getAllActionsForItem(UWLContext context,
Item item)
throws UWLException
isBackEndConnectionsAllowed() value from the context.
context - neededitem - not null needed
UWLExceptioncom.sap.netweaver.bc.uwl.connect.IProivderConnector#getAllActionsForItem
WorkLog getHistoryForItem(UWLContext context,
Item item)
throws UWLException
context - requireditem - not null, required
UWLExceptionWorkLog
Map fillDynamicProperties(UWLContext context,
Item item,
Map mapOfDynamicProperties)
context - item - mapOfDynamicProperties -
List getDistinctAttributeValuesForView(UWLContext ctx,
UWLView view,
QueryProperties qp,
CompoundExpression filter,
String atttributeId)
throws UWLException
context - , required, not null.view, - specifies what item types are retreived. A view can
contain many item types.queryProps, - contains the sort order and configuration group information.
(Other properties are ignored for this method).filter, - specifies the filter to apply on the items. If specified
over rides the view's filterattributeId, - specifiy the item attribute to be used.
UWLException - if items could not be retreived.| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] UWLJWF
|
[sap.com] tc/kmc/bc.uwl/api
|
default
|
EP-BC-UWL
|
[sap.com] UWLJWF
|
[sap.com] tc/kmc/bc.uwl/api
|
-
|
EP-BC-UWL
|
|
SAP NetWeaver 7.30 (SP02) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||