Interface IVersionableMechanics
- All Superinterfaces:
IAccessMechanics
,IBasicMechanics
,IClipboardMechanics
,IComponent
,IInitializable
,IMechanics
,ISubscribableMechanics
,ISystemHandler
,IViewableMechanics
- All Known Subinterfaces:
IContainerContentConstraintMechanics
,IContainerMechanics
,IContentMechanics
,IFolderMechanics
,ITemplateMechanics
,ITopicMechanics
Base interface for a versionable metadata item. Defines methods for versioning operation such as
- Adding an item to the versioning
- Removing an item from the versioning
- Checing an item out
- Uncheckin an item
- Checkin an item in
- Getting a list of versions
- Getting a version
- Viewing a version
- Publishing a version
- Setting current version
Also, defines methods to check access and to fire events related to the versioning operations
-
Field Summary
Fields inherited from interface com.webmethods.portal.mech.access.IAccessMechanics
ACCESS_DENIED, ACCESS_GRANTED, ACCESS_RIGHT_ID, ACCESS_RIGHT_LONG_NAME, ACCESS_RIGHT_SHORT_NAME, ACCESS_RIGHTS_CONTAINER, ACCESS_UNSPECIFIED, AUTH_LEVEL_ANONYMOUS, AUTH_LEVEL_BASIC, AUTH_LEVEL_DEFAULT, AUTH_LEVEL_FULL_ACCESS, AUTH_LEVEL_KERBEROS, AUTH_LEVEL_NTLM, AUTH_LEVEL_PROPERTY
Fields inherited from interface com.webmethods.portal.mech.storage.IBasicMechanics
PROP_CUSTOM_FILE_ENCODING, PROP_FILE_ENCODING, TITLEBAR_ACTION_SHOW_ADD_TO_HOME, TITLEBAR_ACTION_SHOW_DISPLAY_OPTIONS, TITLEBAR_ACTION_SHOW_MAXIMIZED, TITLEBAR_ACTION_SHOW_MINIMIZED, TITLEBAR_ACTION_SHOW_NORMAL
Fields inherited from interface com.webmethods.portal.mech.subscription.ISubscribableMechanics
CONTENT_FORMAT_EMAIL, CONTENT_FORMAT_EMAIL_DIGEST, CONTENT_FORMAT_PORTAL_INBOX, CONTENT_FORMAT_PORTAL_INBOX_DIGEST, HEADER_FROM, HEADER_SUBJECT, HEADER_TO
Fields inherited from interface com.webmethods.portal.mech.view.IViewableMechanics
COMMENTS_LINK_TYPE, CONTENT_LINK_TYPE, DEFAULT_ORDER, DEFAULT_PAGE_SIZE, DEFAULT_SORT, DETAILS_LINK_TYPE, LARGE_ICON_TYPE, LINK_TYPE, LINK_TYPE_COMMENTS, LINK_TYPE_CONTENT, LINK_TYPE_DETAILS, LINK_TYPE_EDIT, LINK_TYPE_HELP, LINK_TYPE_HELP_MAXIMIZED, LINK_TYPE_MAXIMIZED, LINK_TYPE_MINIMIZED, LINK_TYPE_PERMISSIONS, LINK_TYPE_PORTAL_CONTENT, LINK_TYPE_PORTLET_STANDALONE, LINK_TYPE_PROPERTIES, LINK_TYPE_RESTORED, LINK_TYPE_SUBSCRIPTIONS, LINK_TYPE_THUMBNAILS, LINK_TYPE_VERSIONS, PERMISSIONS_LINK_TYPE, PORTAL_CONTENT_LINK_TYPE, PROPERTIES_LINK_TYPE, PROPERTY_LINK_TARGET, PROPERTY_OWNER_NAME, PROPERTY_PARENT_NAME, PROPERTY_TOOLTIP, REFERENCE_ICON_TYPE, SUBSCRIPTIONS_LINK_TYPE, THUMBNAIL_ICON_TYPE, THUMBNAILS_LINK_TYPE, VERSIONS_LINK_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionaddToVersioning
(IThingID itemId, IThingID userId) Adds the specified item to versioning.boolean
canAddToVersioning
(IThingID itemId, IThingID userId) Checks whether or not the specified user can add the specified item into the versioning.boolean
canCheckIn
(IThingID itemId, IThingID userId) Checks whether or not the specified user can check the specified item in.boolean
canCheckOut
(IThingID itemId, IThingID userId) Check if the specified user can check out the specified item.boolean
canListVersions
(IThingID itemId, IThingID userId, Map<?, ?> capabilities) Check if the specified user can list versions of the specified item.boolean
canPublishVersion
(IThingID itemId, IThingID userId) Checks whether or not the specified user can publish a version of the specified item.boolean
canRemoveFromVersioning
(IThingID itemId, IThingID userId) Checks whether or not the specified user can remove the specified item from the versioning.boolean
canSetCurrentVersion
(IThingID itemId, IThingID userId, String version) Checks whether or not the specified user can set the specified version as the most current one.boolean
canUndoCheckOut
(IThingID itemId, IThingID userId) Checks whether or not the specified user can uncheck the specified item.boolean
canViewVersion
(IThingID itemId, IThingID userId, Map<?, ?> capabilities, String version) Checks if the specified user can view the specified version.void
checkAddToVersioning
(IThingID itemId, IThingID userId) The same ascanAddToVersioning(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.void
checkCheckIn
(IThingID itemId, IThingID userId) The same ascanCheckIn(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.void
checkCheckOut
(IThingID itemId, IThingID userId) The same ascanCheckOut(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.void
checkIn
(IThingID itemId, IThingID userId, Object dataToBeCheckedIn, String sComment, String encoding) Checks in the specified item.void
checkListVersions
(IThingID itemId, IThingID userId, Map<?, ?> capabilities) The same ascanListVersions(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, java.util.Map<?, ?>)
but throws an exception.void
Checks out the specified item.void
checkPublishVersion
(IThingID itemId, IThingID userId) The same ascanPublishVersion(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.void
checkRemoveFromVersioning
(IThingID itemId, IThingID userId) The same ascanRemoveFromVersioning(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.void
checkSetCurrentVersion
(IThingID itemId, IThingID userId, String version) The same ascanSetCurrentVersion(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, java.lang.String)
but throws an exception.void
checkUndoCheckOut
(IThingID itemId, IThingID userId) The same ascanUndoCheckOut(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.void
checkViewVersion
(IThingID itemId, IThingID userId, Map<?, ?> capabilities, String version) void
fireAddToVersioningEvent
(IThingID itemId, IThingID userId, int status) Fires an event to indicate that the specified item is added into the versioning.void
fireCheckInEvent
(IThingID itemId, IThingID userId, int status) Fires an event to indicate that the specified item is checked in.void
fireCheckOutEvent
(IThingID itemId, IThingID userId, int status) Fires an event to indicate that the specified item is checked out.void
fireListVersionsEvent
(IThingID itemId, IThingID userId, int status) Fires an event to indicate that versions of the specified item is listed.void
firePublishVersionEvent
(IThingID srcItemId, IThingID userId, int status, int version, IThingID dstContainerId, IThingID dstItemId) Fires an event to indicate that the specified version is published.void
fireRemoveFromVersioningEvent
(IThingID itemId, IThingID userId, int status) Fires an event to indicate that the specified item is removed from the versioning.void
fireSetCurrentVersionEvent
(IThingID itemId, IThingID userId, int status, String version) Fires an event to indicate that the specified version of the specified item is set as the current one.void
fireUndoCheckOutEvent
(IThingID itemId, IThingID userId, int status) Fires an event to indicate that the specified item is unchecked.void
fireViewVersionEvent
(IThingID itemId, IThingID userId, int status, String version) Fires an event when a version of the specified item is viewed.getCheckedOutBy
(IThingID itemId) Returns the user ID who has the specified item checked out, or null if the item is not checked out.getVersion
(IThingID itemId, String sVersionId) Returns the version given by its id.boolean
isCheckedOut
(IThingID itemId) Checks whether or not the specified item is checked out.boolean
isVersioned
(IThingID itemId) Checks whether or not the specified item is versioned.listVersions
(IThingID itemId) Returns a list ofIView
of the specified item.publishVersion
(IThingID containerId, IThingID userId, IThingID itemId, String sVersionId) Publishes a copy of the specified version of the specified item into the specified container.void
removeFromVersioning
(IThingID itemId, IThingID userId) Removes the specified item from the versioning.void
setCurrentVersion
(IThingID itemId, IThingID userId, String sVersionId) Sets the specified version of the specified item as the current version.void
undoCheckOut
(IThingID itemId, IThingID userId) Undoes the check out of the specified item.viewVersion
(IThingID itemId, String sVersionId) Returns a view of the version given by its id.Methods inherited from interface com.webmethods.portal.mech.access.IAccessMechanics
canRemoveSecurityRealm, canSetSecurityRealm, checkAccess, checkAccessEx, checkRemoveSecurityRealm, checkSetSecurityRealm, cloneAces, fireRemoveAcccesEvent, fireRemoveSecurityRealmEvent, fireSetAccessEvent, fireSetAuthenticationEvent, fireSetOwnerEvent, fireSetSecurityRealmEvent, getAccessEx, getAccessList, getAccessListEx, getAclView, getAuthLevelForAuthScheme, getAuthScheme, getAuthSchemeForAuthLevel, getAuthSchemeForResource, getAvailableAuthSchemes, getDefaultAuthScheme, getRightNameForValue, getRightsForType, getRightValueForName, getSecurityRealm, invalidateAcesForThing, invalidateAcesForUser, listSecurityRealmObjects, removeAces, removeSecurityRealm, setAces, setAcesEx, setSecurityRealm, setSecurityRealm
Methods inherited from interface com.webmethods.portal.mech.storage.IBasicMechanics
addNote, addReference, addRelation, canAddNote, canCloneRemote, canCreate, canDelete, canDestroy, canDoTitlebarAction, canListAccess, canListContainers, canListNotes, canRemoveAccess, canRemoveNote, canSetAccess, canSetAuthentication, canSetOwner, canUninstall, canUpdateContent, canUpdateProperties, canVerb, canViewAuthentication, canViewContent, checkAddNote, checkCloneRemote, checkCreate, checkDelete, checkDestroy, checkListAccess, checkListContainers, checkListNotes, checkRemoveAccess, checkRemoveNote, checkSetAccess, checkSetAuthentication, checkSetOwner, checkUninstall, checkUpdateContent, checkUpdateProperties, checkViewAuthentication, checkViewContent, cloneRemote, copy, create, create, delete, destroy, doAfterInstall, doAfterUpgrade, doBeforeUninstall, doBeforeUpgrade, fireAddNoteEvent, fireCacheInvalidateEvent, fireDeleteEvent, fireInsoEvent, fireListAccessEvent, fireListContainersEvent, fireListNotesEvent, firePurgeEvent, fireRemoveAcccesEvent, fireRemoveNoteEvent, fireSetAccessEvent, fireSetAuthenticationEvent, fireSetOwnerEvent, fireUpdateContentEvent, fireUpdatePropertiesEvent, fireViewAuthenticationEvent, fireViewContentEvent, getAccess, getAncestors, getAuthentication, getContent, getContent, getContentStore, getContentStore, getDependencyList, getPrimaryRelatedChild, getPrimaryRelatedContainer, getTimeToLive, isAnonymous, isBaseType, isContainer, isNormal, isReference, isVersionable, isWorkflowEnabled, listAccess, listAccess, listContainers, listContainers, listDependants, listNotes, listRelatedChildren, listRelatedContainers, move, move, prepareForDeletion, removeNote, removeReference, removeRelation, restoreXTypeConfProps, saveXTypeConfProps, setAuthentication, setOwner, setTimeToLive, undeleteAllUndestroyed, updateContent, updateContent, updateProperties, updateProperties
Methods inherited from interface com.webmethods.portal.mech.clipboard.IClipboardMechanics
canCopyToClipboard, canCutToClipboard, checkCopyToClipboard, checkCutToClipboard, copyToClipboard, cutToClipboard, getClipboard, getClipboardInfo, newClipboardItem
Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
Methods inherited from interface com.webmethods.portal.mech.subscription.ISubscribableMechanics
canDeliverToPrincipal, canEditSubscription, canListSubscriptions, canViewSubscription, checkEditSubscription, checkListSubscriptions, checkViewSubscription, checkViewSubscription, createAppCriteria, createAppCriteriaFolder, createPortletSubscription, createPortletSubscription, disable, disable, disableBySystem, disableBySystem, enable, enable, fireGetAppCriteriaEvent, fireGetSubscriptionEvent, fireSetSubscriptionEvent, fireUnsubscribeEvent, fireViewSubscriptionEvent, generateNotificationContent, generateNotificationHeaders, getAppCriteria, getGroupSubscription, getSubscription, listSubscriptions, listSubscriptions, setGroupSubscription, setGroupSubscription, setSubscription, setSubscription, unsubscribe, unsubscribe, viewSubscription
Methods inherited from interface com.webmethods.portal.mech.view.IViewableMechanics
canView, checkView, createPagingCookie, fireViewEvent, getCss, getCss, getDefaultLinkType, getFormattedProperty, getHierachicalUri, getIcon, getIcon, getLink, getLink, getListProperty, getListPropertyHTML, getListPropertyJS, isEnabled, view, view
-
Method Details
-
canViewVersion
boolean canViewVersion(IThingID itemId, IThingID userId, Map<?, ?> capabilities, String version) throws PortalExceptionChecks if the specified user can view the specified version.The user has to have
IAccessRight.READ
to view a version.- Parameters:
itemId
- The item, whose version is to be viewed.userId
- The user, whose rights to be checked.capabilities
- The capabilities of the user.version
- The ID of the version to be viewed.- Returns:
- true if the specified user can view a version of the specified item. Otherwise false.
- Throws:
PortalException
- if any error occures
-
checkViewVersion
void checkViewVersion(IThingID itemId, IThingID userId, Map<?, ?> capabilities, String version) throws PortalException, PortalAccessExceptionThe same ascanViewVersion(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, java.util.Map<?, ?>, java.lang.String)
but throws an exception.- Parameters:
itemId
- The item, whose version is to be viewed.userId
- The user, whose rights to be checked.capabilities
- The capabilities of the user.version
- The ID of the version to be viewed.- Throws:
PortalException
- if any error occursPortalAccessException
- if the user does not have right to view the version.- See Also:
-
canListVersions
boolean canListVersions(IThingID itemId, IThingID userId, Map<?, ?> capabilities) throws PortalExceptionCheck if the specified user can list versions of the specified item.The user has to have
IAccessRight.READ
to list versions.- Parameters:
itemId
- The item, whose versions are to be listed.userId
- The user, whose rights to be checked.capabilities
- The capabilities of the user.- Returns:
- true if the specified user can list the versions of the specified item.
- Throws:
PortalException
- if any error occurs
-
checkListVersions
void checkListVersions(IThingID itemId, IThingID userId, Map<?, ?> capabilities) throws PortalException, PortalAccessExceptionThe same ascanListVersions(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, java.util.Map<?, ?>)
but throws an exception.- Parameters:
itemId
- The item, whose versions are to be listed.userId
- The user, whose rights to be checked.capabilities
- The capabilities of the user.- Throws:
PortalAccessException
- if the specified user can not list the versions of the specified item.PortalException
- if any error occurs- See Also:
-
canAddToVersioning
Checks whether or not the specified user can add the specified item into the versioning.The user has to have
IAccessRight.MODIFY
to add the item into the versioning.- Parameters:
itemId
- The item is to be versioned.userId
- The user, whose rights to be checked.- Returns:
- true if the specified user can add the specified item to the versioning.
- Throws:
PortalException
- if any error occurs
-
checkAddToVersioning
void checkAddToVersioning(IThingID itemId, IThingID userId) throws PortalException, PortalAccessException The same ascanAddToVersioning(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.- Parameters:
itemId
- The item is to be versioned.userId
- The user, whose rights to be checked.- Throws:
PortalException
- if any error occursPortalAccessException
- if the specified user cannot add the specified item into the versioning- See Also:
-
canRemoveFromVersioning
Checks whether or not the specified user can remove the specified item from the versioning.The user has to have
IAccessRight.DELETE
to remove the item from the versioning.- Parameters:
itemId
- The item is to be removed from the versioning.userId
- The user, whose rights to be checked.- Returns:
- true if the specified user can remove the specified item from versioning
- Throws:
PortalException
- if any error occurs
-
checkRemoveFromVersioning
void checkRemoveFromVersioning(IThingID itemId, IThingID userId) throws PortalException, PortalAccessException The same ascanRemoveFromVersioning(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.- Parameters:
itemId
- The item is to be removed from the versioning.userId
- The user, whose rights to be checked.- Throws:
PortalException
- if any error occursPortalAccessException
- if the specified user can not remove the specified item from the versioning.- See Also:
-
canSetCurrentVersion
boolean canSetCurrentVersion(IThingID itemId, IThingID userId, String version) throws PortalException Checks whether or not the specified user can set the specified version as the most current one.The user has to have
IAccessRight.MODIFY
.- Parameters:
itemId
- The item, for which to set current version.userId
- The user, whose rights to be checked.version
- ID of the version to be set as the current one.- Returns:
- if the specified user can set the specified version of the specified item as the current one.
- Throws:
PortalException
- if any error occurs
-
checkSetCurrentVersion
void checkSetCurrentVersion(IThingID itemId, IThingID userId, String version) throws PortalException, PortalAccessException The same ascanSetCurrentVersion(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, java.lang.String)
but throws an exception.- Parameters:
itemId
- The item, for which to set current version.userId
- The user, whose rights to be checked.version
- ID of the version to be set as the current one.- Throws:
PortalException
- if any error occursPortalAccessException
- if the specified user cannot set the current version of the specified item.- See Also:
-
canPublishVersion
Checks whether or not the specified user can publish a version of the specified item.- Parameters:
itemId
- The item, whose version to publish.userId
- The user, whose rights to be checked.- Returns:
- true if the the specified user can publish a version of the specified item
- Throws:
PortalException
- if any error occurs
-
checkPublishVersion
void checkPublishVersion(IThingID itemId, IThingID userId) throws PortalException, PortalAccessException The same ascanPublishVersion(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.- Parameters:
itemId
- The item, whose version to publish.userId
- The user, whose rights to be checked.- Throws:
PortalException
- if any error occursPortalAccessException
- if the specified user cannot publish a version the specified item.- See Also:
-
canCheckOut
Check if the specified user can check out the specified item.The specified item should not be checked out by another user.
The user has to have
IAccessRight.MODIFY
.- Parameters:
itemId
- The item is to be checked out.userId
- The user, whose rights to be checked.- Returns:
- true if the specified user can check out the specified item.
- Throws:
PortalException
- if any error occurs
-
checkCheckOut
The same ascanCheckOut(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.- Parameters:
itemId
- The item is to be checked out.userId
- The user, whose rights to be checked.- Throws:
PortalException
- if any error occursPortalAccessException
- if the specified user can not check out the specified item.- See Also:
-
canCheckIn
Checks whether or not the specified user can check the specified item in.The specified item has to be checked out by the specified user.
- Parameters:
itemId
- The item is to be checked in.userId
- The user, whose rights to be checked.- Returns:
- true if the specified user can check in the specified item.
- Throws:
PortalException
- if any error occurs
-
checkCheckIn
The same ascanCheckIn(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.- Parameters:
itemId
- The item is to be checked in.userId
- The user, whose rights to be checked.- Throws:
PortalException
- if any error occursPortalAccessException
- if the specified user can not check in the specified item
-
canUndoCheckOut
Checks whether or not the specified user can uncheck the specified item. The specified item has to be checked out by the specified user. Portal Administrator can uncheck any item checked out by any user.- Parameters:
itemId
- The item is to be unchecked.userId
- The user, whose rights to be checked.- Returns:
- true if the specified user can uncheck out the specified item.
- Throws:
PortalException
- if any error occurs
-
checkUndoCheckOut
void checkUndoCheckOut(IThingID itemId, IThingID userId) throws PortalException, PortalAccessException The same ascanUndoCheckOut(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID)
but throws an exception.- Parameters:
itemId
- The item is to be unchecked.userId
- The user, whose rights to be checked.- Throws:
PortalException
- if any error occursPortalAccessException
- if the specified user can not uncheck out the specified item- See Also:
-
fireViewVersionEvent
void fireViewVersionEvent(IThingID itemId, IThingID userId, int status, String version) throws PortalException Fires an event when a version of the specified item is viewed. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
itemId
- The item whose version is viewed.userId
- The user who views the version.status
- The status of the event (sucessful, denied, error).version
- ID of the version viewed.- Throws:
PortalException
- if any error occurs- See Also:
-
fireListVersionsEvent
Fires an event to indicate that versions of the specified item is listed. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
itemId
- The item whose versions were listed.userId
- The user who listed the versions.status
- The status of the event (sucessful, denied, error).- Throws:
PortalException
- if any error occurs- See Also:
-
fireAddToVersioningEvent
Fires an event to indicate that the specified item is added into the versioning. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
itemId
- The item was added into the versioning.userId
- The user who added the item into the versioning.status
- The status of the event (sucessful, denied, error).- Throws:
PortalException
- if any error occurs- See Also:
-
fireRemoveFromVersioningEvent
void fireRemoveFromVersioningEvent(IThingID itemId, IThingID userId, int status) throws PortalException Fires an event to indicate that the specified item is removed from the versioning. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
itemId
- The item was removed from versioning.userId
- The user who removed the item from versioning.status
- The status of the event (sucessful, denied, error).- Throws:
PortalException
- if any error occurs- See Also:
-
fireSetCurrentVersionEvent
void fireSetCurrentVersionEvent(IThingID itemId, IThingID userId, int status, String version) throws PortalException Fires an event to indicate that the specified version of the specified item is set as the current one. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
itemId
- The item whose version was set as the current one.userId
- The user who set the current version.status
- The status of the event (sucessful, denied, error).version
- ID of the version was set as the curent one.- Throws:
PortalException
- if any error occurs- See Also:
-
firePublishVersionEvent
void firePublishVersionEvent(IThingID srcItemId, IThingID userId, int status, int version, IThingID dstContainerId, IThingID dstItemId) throws PortalException Fires an event to indicate that the specified version is published. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
srcItemId
- The item whose version was published.userId
- The user who published the version.status
- The status of the event (sucessful, denied, error).version
- ID of the published version.dstContainerId
- The container into which the version was published.dstItemId
- The newly published item.- Throws:
PortalException
- if any error occurs- See Also:
-
fireCheckOutEvent
Fires an event to indicate that the specified item is checked out. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
itemId
- The item was checked out.userId
- The user who checked out the item.status
- Status of the event (sucessful, denied, error).- Throws:
PortalException
- if any error occurs- See Also:
-
fireCheckInEvent
Fires an event to indicate that the specified item is checked in. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
itemId
- The item was checked in.userId
- The user who checked in the item.status
- The status of the event (sucessful, denied, error).- Throws:
PortalException
- if any error occurs- See Also:
-
fireUndoCheckOutEvent
Fires an event to indicate that the specified item is unchecked. The current implementation just callsIBasicMechanics.fireUpdatePropertiesEvent(com.webmethods.portal.service.meta2.thing.IThingID, com.webmethods.portal.service.meta2.thing.IThingID, int, com.webmethods.rtl.util.obj.DifferenceMap)
.- Parameters:
itemId
- The item was checked out.userId
- The user who unchecked out of the item.status
- Status of the event (sucessful, denied, error).- Throws:
PortalException
- if any error occurs- See Also:
-
isVersioned
Checks whether or not the specified item is versioned.- Parameters:
itemId
- The item is to be tested.- Returns:
- true if the specified item is versioned.
- Throws:
PortalException
- if any error occurs
-
isCheckedOut
Checks whether or not the specified item is checked out.- Parameters:
itemId
- The item is to be tested.- Returns:
- true if the specified item is checked out.
- Throws:
PortalException
- if any error occurs
-
getCheckedOutBy
Returns the user ID who has the specified item checked out, or null if the item is not checked out.- Parameters:
itemId
- The item is to be tested.- Returns:
- ID of the user, or null if the item is not checked out.
- Throws:
PortalException
- if any error occurs
-
getVersion
Returns the version given by its id.- Parameters:
itemId
- item whose version is to be returnedsVersionId
- ID the version to be returned- Throws:
PortalException
- if the version could not be found or any error occurs
-
viewVersion
Returns a view of the version given by its id.- Parameters:
itemId
- The item whose version is to be viewedsVersionId
- ID the version to be returned- Throws:
PortalException
- if the version could not be found or any error occurs
-
listVersions
Returns a list ofIView
of the specified item. The versions are sorted in ascending order.- Parameters:
itemId
- The item for which to list versions.- Returns:
- List of
IView
items, or an empty list. - Throws:
PortalException
- if any error occurs
-
addToVersioning
Adds the specified item to versioning. New versioning vistory is created and first version is added on the top of history.- Parameters:
itemId
- The item is to be added into the versioning.userId
- The user adding the item.- Returns:
- IThingID of newly created versioned thing
- Throws:
PortalException
- if any error occurs
-
removeFromVersioning
Removes the specified item from the versioning. The version history is destroyed.- Parameters:
itemId
- The item is to be removed from the versioning.userId
- The user removing the item.- Throws:
PortalException
- if any error occurs
-
setCurrentVersion
Sets the specified version of the specified item as the current version. New version is added on the top of the version history. That could not be applied to the latest version.- Parameters:
itemId
- The item for which to set the current version.userId
- The user setting the current version.sVersionId
- ID of the version to be set as the current one (could not be latest version).- Throws:
PortalException
- if any error occurs
-
publishVersion
IThingID publishVersion(IThingID containerId, IThingID userId, IThingID itemId, String sVersionId) throws PortalException Publishes a copy of the specified version of the specified item into the specified container. This method is not used and not implemented. To publish the latest versiongetVersion(com.webmethods.portal.service.meta2.thing.IThingID, java.lang.String)
is used. It returns the version and then it is passed in the publish process.- Parameters:
containerId
- The container into which to publish the new item.userId
- The user publishing the version.itemId
- The item whose version to publish.sVersionId
- ID of the version to be published.- Returns:
- Newly published item.
- Throws:
PortalException
- if any error occurs
-
checkOut
Checks out the specified item. Once that is done, the item is being locked by the specified user. The item can be checked in by the same user or unchecked by the user or Portal Adminstrator.- Parameters:
itemId
- The item to check out.userId
- The user checking out the item.- Throws:
PortalException
- if any error occurs
-
checkIn
void checkIn(IThingID itemId, IThingID userId, Object dataToBeCheckedIn, String sComment, String encoding) throws PortalException Checks in the specified item. The item can be checked in by the user, whom checked the item out.- Parameters:
itemId
- The item to be checked in.userId
- The user checking in the item.dataToBeCheckedIn
- The data to be checked in. That is strongly depends on type of the item. Since the versioning system supports just {@link @com.webmethods.portal.service.meta2.storage.IContent} this parameter iscom.webmethods.rtl.util.obj.PortalFileBean
sComment
- The comment to label the version being checked in.- Throws:
PortalException
- if any error occurs
-
undoCheckOut
Undoes the check out of the specified item. The item can be unchecked by the user, whom checked the item out or by Portal Administrator.- Parameters:
itemId
- The item for which to undo the check out.userId
- The user undoing the check out.- Throws:
PortalException
- if any error occurs
-