public interface IContainerPolicy extends IBasicPolicy, IViewableContainerPolicy
Policy used to manipulate (create, move, delete, etc.) metadata service container things (ie topics and folders).
Policy commands are always invoked with a IContext
object.
The IContext
object contains information about the user on whose
behalf the command is invoked, as well as access, event, and workflow states.
These states, which can be toggled on and off, are known as traits,
and are encapsulated by the ITraits
object.
By default, all policy commands will check access, fire events, and initiate workflow
as appropriate for the command.
Modifier and Type | Method and Description |
---|---|
IThingID |
clonePortalPage(IContext context,
IURI resourceURI)
Clones a portal Page to the user's home folder
|
IThingID |
copy(IContext context,
IURI parentID,
IURI childID)
Creates a copy of the specified item in the specified container.
|
IThingID |
copy(IContext context,
IURI parentID,
IURI childID,
String newName)
Creates a copy of the specified item in the specified container.
|
IThingID |
createChild(IContext context,
IThingID parentID,
Map<String,? extends Object> properties)
Creates a new thing as a primary child in the specified container,
with the specified properties.
|
String |
createUniqueName(IContext context,
IThingID resourceURI,
String name)
Creates a unique name in the given folder
|
ISelectedListView |
getSelectedListView(IContext context,
IThingID rootID,
IURI resourceURI,
int depth)
Given a root, and a current resource, walk down from the root
depth levels. |
IListView<? extends IView> |
listChildren(IContext context,
IThingID containerId,
String view,
int action,
int rights,
int depth,
boolean includeItems)
Deprecated.
|
IListView<? extends IView> |
listChildren(IContext context,
IThingID containerId,
String view,
int action,
int rights,
int depth,
boolean includeItems,
boolean extraInfo)
Deprecated.
|
IListView<? extends IView> |
listChildren(IContext context,
IThingID containerId,
String view,
int action,
int rights,
int depth,
boolean includeItems,
boolean extraInfo,
int filter)
Deprecated.
|
IListView<? extends IView> |
listChildren(IContext context,
IThingID containerId,
String view,
int action,
IRightSet rights,
int depth,
boolean includeItems)
Lists the primary and reference items in the specified container.
|
IListView<? extends IView> |
listChildren(IContext context,
IThingID containerId,
String view,
int action,
IRightSet rights,
int depth,
boolean includeItems,
boolean extraInfo)
Lists the primary and reference items in the specified container.
|
IListView<? extends IView> |
listChildren(IContext context,
IThingID containerId,
String view,
int action,
IRightSet rights,
int depth,
boolean includeItems,
boolean extraInfo,
int filter)
Lists the primary and reference items in the specified container.
|
IListView<? extends IView> |
matchChildren(IContext context,
IThingID containerId,
String regEx,
int start,
int end,
int rights)
Deprecated.
|
IListView<? extends IView> |
matchChildren(IContext context,
IThingID containerId,
String regEx,
int start,
int end,
IRightSet rights)
Lists the primary children in the specified container which match the RegEx.
|
IListView<? extends IView> |
matchChildren(IContext context,
IThingID containerId,
String regEx,
IPagingCookie cookie,
int rights)
Deprecated.
|
IListView<? extends IView> |
matchChildren(IContext context,
IThingID containerId,
String regEx,
IPagingCookie cookie,
IRightSet rights)
Lists the primary children in the specified container which match the RegEx.
|
IThingID |
obtainOwnedFolder(IContext context,
IThingID parentID,
int type,
String name,
Map<String,?> properties)
Finds the folder of the specified folder type for the specified context,
or creates a new one with the specified properties if not found.
|
Integer |
validatePublish(IContext context,
IThingID resourceURI,
String xtype,
String name)
Validate a user can publish an item of the given xtype in the specified folder.
|
addNote, addToTopics, canUser, cloneRemote, copyToClipboard, cutToClipboard, delete, deleteReference, destroy, getContent, listContainers, listNotes, moveThing, moveThing, pasteFromClipboard, removeNote, setOwner, updateProperties
getPagingCookie, getPagingCookie, pageBackward, pageForeward, setPagingCookie
getIcon, view
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
@Deprecated IListView<? extends IView> listChildren(IContext context, IThingID containerId, String view, int action, int rights, int depth, boolean includeItems) throws BizException
listChildren(IContext, IThingID, String, int, IRightSet, int, boolean)
insteadcontext
- Command context (user state information).containerId
- Container whose contents to list.view
- User-defined name of view. Null by default.action
- Paging action: IPagingCookie.ACTION_REFRESH
,
IPagingCookie.ACTION_PREVIOUS
, or IPagingCookie.ACTION_NEXT
.rights
- Right set by which to filter. Usually IAccessRight.READ
.depth
- Number of levels of descendants to list.
If one, lists children; if two, lists children and grandchildren; etc.
If less than one, lists all descendants.includeItems
- True if all descendant types should be included in list;
false if only container types should be included.IView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.IListView<? extends IView> listChildren(IContext context, IThingID containerId, String view, int action, IRightSet rights, int depth, boolean includeItems) throws BizException
context
- Command context (user state information).containerId
- Container whose contents to list.view
- User-defined name of view. Null by default.action
- Paging action: IPagingCookie.ACTION_REFRESH
,
IPagingCookie.ACTION_PREVIOUS
, or IPagingCookie.ACTION_NEXT
.rights
- Right set by which to filter. Usually IAccessRight.READ
.depth
- Number of levels of descendants to list.
If one, lists children; if two, lists children and grandchildren; etc.
If less than one, lists all descendants.includeItems
- True if all descendant types should be included in list;
false if only container types should be included.IView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.@Deprecated IListView<? extends IView> listChildren(IContext context, IThingID containerId, String view, int action, int rights, int depth, boolean includeItems, boolean extraInfo) throws BizException
listChildren(IContext, IThingID, String, int, IRightSet, int, boolean, boolean)
insteadcontext
- Command context (user state information).containerId
- Container whose contents to list.view
- User-defined name of view. Null by default.action
- Paging action: IPagingCookie.ACTION_REFRESH
,
IPagingCookie.ACTION_PREVIOUS
, or IPagingCookie.ACTION_NEXT
.rights
- Right set by which to filter. Usually IAccessRight.READ
.depth
- Number of levels of descendants to list.
If one, lists children; if two, lists children and grandchildren; etc.
If less than one, lists all descendants.includeItems
- True if all descendant types should be included in list;
false if only container types should be included.extraInfo
- True to add extra info (such as portlet properties) to each IView
.IView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.IListView<? extends IView> listChildren(IContext context, IThingID containerId, String view, int action, IRightSet rights, int depth, boolean includeItems, boolean extraInfo) throws BizException
context
- Command context (user state information).containerId
- Container whose contents to list.view
- User-defined name of view. Null by default.action
- Paging action: IPagingCookie.ACTION_REFRESH
,
IPagingCookie.ACTION_PREVIOUS
, or IPagingCookie.ACTION_NEXT
.rights
- Right set by which to filter. Usually IAccessRight.READ
.depth
- Number of levels of descendants to list.
If one, lists children; if two, lists children and grandchildren; etc.
If less than one, lists all descendants.includeItems
- True if all descendant types should be included in list;
false if only container types should be included.extraInfo
- True to add extra info (such as portlet properties) to each IView
.IView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.@Deprecated IListView<? extends IView> listChildren(IContext context, IThingID containerId, String view, int action, int rights, int depth, boolean includeItems, boolean extraInfo, int filter) throws BizException
listChildren(IContext, IThingID, String, int, IRightSet, int, boolean, boolean, int)
insteadcontext
- Command context (user state information).containerId
- Container whose contents to list.view
- User-defined name of view. Null by default.action
- Paging action: IPagingCookie.ACTION_REFRESH
,
IPagingCookie.ACTION_PREVIOUS
, or IPagingCookie.ACTION_NEXT
.rights
- Right set by which to filter. Usually IAccessRight.READ
.depth
- Number of levels of descendants to list.
If one, lists children; if two, lists children and grandchildren; etc.
If less than one, lists all descendants.includeItems
- True if all descendant types should be included in list;
false if only container types should be included.extraInfo
- True to add extra info (such as portlet properties) to each IView
.filter
- apply a filter in the form of an IThingType
. All
items in the result list will be of this typeIView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.IListView<? extends IView> listChildren(IContext context, IThingID containerId, String view, int action, IRightSet rights, int depth, boolean includeItems, boolean extraInfo, int filter) throws BizException
context
- Command context (user state information).containerId
- Container whose contents to list.view
- User-defined name of view. Null by default.action
- Paging action: IPagingCookie.ACTION_REFRESH
,
IPagingCookie.ACTION_PREVIOUS
, or IPagingCookie.ACTION_NEXT
.rights
- Right set by which to filter. Usually IAccessRight.READ
.depth
- Number of levels of descendants to list.
If one, lists children; if two, lists children and grandchildren; etc.
If less than one, lists all descendants.includeItems
- True if all descendant types should be included in list;
false if only container types should be included.extraInfo
- True to add extra info (such as portlet properties) to each IView
.filter
- apply a filter in the form of an IThingType
. All
items in the result list will be of this typeIView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.@Deprecated IListView<? extends IView> matchChildren(IContext context, IThingID containerId, String regEx, int start, int end, int rights) throws BizException
matchChildren(IContext, IThingID, String, int, int, IRightSet)
instteadcontext
- Command context (user state information).containerId
- Container whose contents to list.rights
- Right set by which to filter. Usually IAccessRight.READ
.IView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.IListView<? extends IView> matchChildren(IContext context, IThingID containerId, String regEx, int start, int end, IRightSet rights) throws BizException
context
- Command context (user state information).containerId
- Container whose contents to list.rights
- Right set by which to filter. Usually IAccessRight.READ
.IView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.@Deprecated IListView<? extends IView> matchChildren(IContext context, IThingID containerId, String regEx, IPagingCookie cookie, int rights) throws BizException
matchChildren(IContext, IThingID, String, IPagingCookie, IRightSet)
insteadcontext
- Command context (user state information).containerId
- Container whose contents to list.rights
- Right set by which to filter. Usually IAccessRight.READ
.IView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.IListView<? extends IView> matchChildren(IContext context, IThingID containerId, String regEx, IPagingCookie cookie, IRightSet rights) throws BizException
context
- Command context (user state information).containerId
- Container whose contents to list.rights
- Right set by which to filter. Usually IAccessRight.READ
.IView
s representing metadata things contained
by the specified container.BizException
- if command fails because access was denied or a datasource error occured.IThingID createChild(IContext context, IThingID parentID, Map<String,? extends Object> properties) throws BizException
Creates a new thing as a primary child in the specified container, with the specified properties. Common properties include:
IConstants.XTYPE_NAME
('xtype') -- requiredIConstants.NAME
('name') -- requiredIConstants.DESCRIPTION
('description') -- optionalIConstants.INFO
('info') -- optionalIConstants.FOLDER_TYPE
('folderType') -- optional, and only used by folder itemscontext
- Command context (user state information).parentID
- Container in which to create the new child.properties
- Properties of the new child.
Must include IConstants.XTYPE_NAME
and IConstants.NAME
.BizException
- if command fails because access was denied or a datasource error occured.IThingID copy(IContext context, IURI parentID, IURI childID) throws BizException
context
- Command context (user state information).parentID
- Container in which to create the new child.childID
- Original item to copy.BizException
- if command fails because access was denied or a datasource error occured.IThingID copy(IContext context, IURI parentID, IURI childID, String newName) throws BizException
context
- Command context (user state information).parentID
- Container in which to create the new child.childID
- Original item to copy.newName
- new name for the copied thingBizException
- if command fails because access was denied or a datasource error occured.IThingID obtainOwnedFolder(IContext context, IThingID parentID, int type, String name, Map<String,?> properties) throws BizException
context
- Command context (user state information).parentID
- Container in which to search.type
- IFolderType
for which to search.name
- Name to use for folder if it is not found and must be created.properties
- Properties with which to create the new folder,
if the folder type is not found. See createChild(com.webmethods.portal.bizPolicy.IContext, com.webmethods.portal.service.meta2.thing.IThingID, java.util.Map<java.lang.String, ? extends java.lang.Object>)
for common property info.
May be null.BizException
- if command fails because access was denied or a datasource error occured.Integer validatePublish(IContext context, IThingID resourceURI, String xtype, String name) throws BizException
context
- the current user contextresourceURI
- the URI of the folder to queryxtype
- the xtype of the child that will be createdname
- the name of the resourcecom.webmethods.portal.bizPolicy.command.meta.PublishValidateCommand
BizException
String createUniqueName(IContext context, IThingID resourceURI, String name) throws BizException
context
- the current user contextresourceURI
- the URI of the folder to queryname
- the starting nameBizException
IThingID clonePortalPage(IContext context, IURI resourceURI) throws BizException
context
- resourceURI
- BizException
ISelectedListView getSelectedListView(IContext context, IThingID rootID, IURI resourceURI, int depth) throws BizException
depth
levels.
(0 would equal the root). Then return the ISelectedListView
that shows
the sibling items at that level, including the current item which is selected. context
- the current user contextrootID
- the root of the depth based list viewresourceURI
- the item that helps determine the selected pathdepth
- how many levels to descend from the root (0 = root)BizException