public interface IBasicPolicy extends IViewablePolicy
Policy used to manipulate (create, move, delete, etc.) basic metadata service things.
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 |
---|---|
void |
addNote(IContext context,
IThingID itemId,
String note)
Adds a comment about the specified thing.
|
List<IThingID> |
addToTopics(IContext context,
IThingID thingID,
IThingIDList topicIDList)
Adds the specified thing as a reference to each of the specified list of containers.
|
boolean |
canUser(IContext context,
IURI itemID,
String verb,
Object param)
Can user perform a requested verb on the item.
|
IThingID |
cloneRemote(IContext context,
IURI destContainerUri,
IURI srcItemUri,
Map<String,Object> maps)
Copies the specified item from a remote metadata datasource
into the specified container of a local metadata datasource.
|
void |
copyToClipboard(IContext context,
IURI resourceURI,
IURI containerURI,
boolean isReference)
'Copies' the specified item from the specified container into the specified context's clipboard.
|
void |
cutToClipboard(IContext context,
IURI resourceURI,
IURI containerURI,
boolean isReference)
'Cuts' the specified item from the specified container into the specified context's clipboard.
|
void |
delete(IContext context,
IURI uri)
Archives the specified thing, and schedules it for deletion.
|
void |
deleteReference(IContext context,
IURI containerID,
IURI uri)
Removes the specified reference from the specified container.
|
void |
destroy(IContext context,
IURI uri)
Permanently and immediately deletes the specified thing.
|
IContentStore |
getContent(IContext context,
IURI itemID,
String mimeType)
Get's the content of the specified thing.
|
IListView<IView> |
listContainers(IContext context,
IThingID itemId)
Lists the containers that reference the specified thing.
|
IListView<INote> |
listNotes(IContext context,
IThingID itemId)
Lists the comments created about the specified thing.
|
void |
moveThing(IContext context,
IThingID thingID,
IThingID parentID)
Moves the specified thing into the specified container.
|
void |
moveThing(IContext context,
IThingID thingID,
IThingID parentID,
String newName)
Moves the specified thing into the specified container.
|
void |
pasteFromClipboard(IContext context,
IURI resourceURI)
'Pastes' the specified item from the specified context's clipboard into the specified container.
|
void |
removeNote(IContext context,
IThingID itemId,
int noteID)
Removes the specified comment about the specified thing.
|
void |
setOwner(IContext context,
IThingID thingID,
IThingID ownerID)
Sets the owner of the specified thing.
|
void |
updateProperties(IContext context,
IURI uri,
Map<String,? extends Object> properties)
Updates the specified properties of the specified thing.
|
getIcon, getPagingCookie, getPagingCookie, pageBackward, pageForeward, setPagingCookie, view
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
IListView<IView> listContainers(IContext context, IThingID itemId) throws BizException
context
- Command context (user state information).itemId
- Item for which to list.IView
s representing metadata topics or folders
which contain references to the specified thing.BizException
- if command fails because access was denied or a datasource error occured.IListView<INote> listNotes(IContext context, IThingID itemId) throws BizException
context
- Command context (user state information).itemId
- Item for which to list.IView
s representing comments which have been created about the specified thing.BizException
- if command fails because access was denied or a datasource error occured.void addNote(IContext context, IThingID itemId, String note) throws BizException
context
- Command context (user state information).itemId
- Item for which to add.note
- Comment text.BizException
- if command fails because access was denied or a datasource error occured.void removeNote(IContext context, IThingID itemId, int noteID) throws BizException
context
- Command context (user state information).itemId
- Item for which to remove.noteID
- Id of note to remove.BizException
- if command fails because access was denied or a datasource error occured.INote.getNoteID()
List<IThingID> addToTopics(IContext context, IThingID thingID, IThingIDList topicIDList) throws BizException
context
- Command context (user state information).thingID
- Item to reference.topicIDList
- Containers to which to add the reference.IThingID
s identifing the containers to which the reference was actually added.BizException
- if command fails because access was denied or a datasource error occured.void moveThing(IContext context, IThingID thingID, IThingID parentID) throws BizException
context
- Command context (user state information).thingID
- Item to move.parentID
- Container into which to move.BizException
- if command fails because access was denied or a datasource error occured.void moveThing(IContext context, IThingID thingID, IThingID parentID, String newName) throws BizException
context
- Command context (user state information).thingID
- Item to move.parentID
- Container into which to move.newName
- new name for the moved thingBizException
- if command fails because access was denied or a datasource error occured.void setOwner(IContext context, IThingID thingID, IThingID ownerID) throws BizException
context
- Command context (user state information).thingID
- Item the owner of which to set.ownerID
- New owner.BizException
- if command fails because access was denied or a datasource error occured.void updateProperties(IContext context, IURI uri, Map<String,? extends Object> properties) throws BizException
context
- Command context (user state information).uri
- Item to update.properties
- Properties to update.BizException
- if command fails because access was denied or a datasource error occured.void delete(IContext context, IURI uri) throws BizException
context
- Command context (user state information).uri
- Item to delete.BizException
- if command fails because access was denied or a datasource error occured.void destroy(IContext context, IURI uri) throws BizException
delete(com.webmethods.portal.bizPolicy.IContext, com.webmethods.portal.system.IURI)
instead.context
- Command context (user state information).uri
- Item to delete.BizException
- if command fails because access was denied or a datasource error occured.void deleteReference(IContext context, IURI containerID, IURI uri) throws BizException
context
- Command context (user state information).containerID
- Container from which to remove the reference.uri
- Item the reference to which to remove.BizException
- if command fails because access was denied or a datasource error occured.void cutToClipboard(IContext context, IURI resourceURI, IURI containerURI, boolean isReference) throws BizException
context
- Command context (user state information).resourceURI
- Item to cut.containerURI
- Container from which to cut. If null, the item's primary container is used.isReference
- False if the container is the item's primary container.BizException
- if command fails because access was denied or a datasource error occured.void copyToClipboard(IContext context, IURI resourceURI, IURI containerURI, boolean isReference) throws BizException
context
- Command context (user state information).resourceURI
- Item to copy.containerURI
- Container from which to copy. If null, the item's primary container is used.isReference
- False if the container is the item's primary container.BizException
- if command fails because access was denied or a datasource error occured.void pasteFromClipboard(IContext context, IURI resourceURI) throws BizException
context
- Command context (user state information).resourceURI
- Container into which to paste.BizException
- if command fails because access was denied or a datasource error occured.IContentStore getContent(IContext context, IURI itemID, String mimeType) throws BizException
context
- Command context (user state information).itemID
- Item whose content to get.mimeType
- Preferred content type to get. Pass null for the default type.BizException
- if command fails because access was denied or a datasource error occured.IThingID cloneRemote(IContext context, IURI destContainerUri, IURI srcItemUri, Map<String,Object> maps) throws BizException
context
- Command context (user state information).destContainerUri
- Local container into which to copy the remote item.srcItemUri
- Remote item to copy.maps
- Custom properties for the newly copied item. May be null.BizException
- if command fails because access was denied or a datasource error occured.boolean canUser(IContext context, IURI itemID, String verb, Object param) throws BizException
context
- Command contextverb
- specified verb nameparam
- verb parameterBizException