public interface IContentService extends IComponent, IView
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_SERVICE_RESET_FLAG
'webmethods.service.content.reset' System property that controls if content services configuration
should be reset from storageConfig.xml config file.
|
static String |
PROP_AVAILABLE
Service view property: identifies if content service in online at that time.
|
static String |
PROP_DEFAULT
Service view property: identifies if content service is default service.
|
static String |
PROP_ROOT
Service view property: root folder for content service.
|
static String |
PROPERTIES_ROOT_NAME
Identifies content service configuration XML root property - where content service root folder
value is stored
|
PROP_DESCRIPTION, PROP_NAME, PROP_TYPE, PROP_URI
Modifier and Type | Method and Description |
---|---|
IContentURI |
acquireURI(IURI uri)
Acquires the normal content uri implementation for the specified string uri.
|
IContentURI |
acquireURI(String uri)
Acquires a uri implementation for the specified string uri.
|
IContentURI |
bind(IURI name,
IContentStore content)
Binds content store to a Uri.
|
IContentURI |
bindAsync(IURI name,
IContentStore content,
IContentEventListener eventListener)
Binds content to a name asynchronously.
|
IContentService |
cloneService()
Clones this service
|
IContentURI |
copy(IURI from,
IURI to,
String[] mimeTypes)
Copies contents from uri to uri.
|
IContentStore |
createContent()
Creates empty content store object for this service
|
void |
createRoot(IURI name)
Pre-creates root folder specified by name.
|
boolean |
destroy(IURI name)
Destroy content in repository.
|
void |
destroyRoot(IURI name)
Destroys root folder for specified uri.
|
boolean |
enableNotification(int listenerToken,
boolean enable)
Enable/disable events notification for registered listener
|
IURI |
generateContentURI(String key1,
String key2)
Creates a content URI based off the key which should be the thing name
|
String |
getContentServiceName()
Returns content name
|
boolean |
isAvailable()
Checks if content server available
|
IContentURI[] |
listContents(IURI root)
Enumerates all content URI under specified root URI
|
IContentURI[] |
listRoots(IURI root)
Enumerates all roots URIs under specified root URI
|
IContentStore |
lookup(IURI name)
Looks up
IContentStore by its uri |
IContentStore |
lookup(IURI name,
String mime)
Looks up for content by both name and mime type
Use this function when several mime types were bound to the the URI
|
int |
registerEventListener(Object eventListener)
Registers event listener object to be notified for Content server operations
|
void |
unregisterEventListener(Object eventListener)
Unregisters event listener object to be notified for Content server operations
|
void |
updateConfiguration(IThingID serviceID,
Element configElem) |
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
init, shutdown
getProperties, getProperty, getPropertyNames, getURI
static final String PROP_DEFAULT
IContentMechanics.getServices(com.webmethods.portal.service.view.IPagingCookie)
static final String PROP_AVAILABLE
IContentMechanics.getServices(com.webmethods.portal.service.view.IPagingCookie)
static final String PROP_ROOT
IContentMechanics.getServices(com.webmethods.portal.service.view.IPagingCookie)
static final String CONTENT_SERVICE_RESET_FLAG
static final String PROPERTIES_ROOT_NAME
IContentStore createContent() throws MetaException
IContentStore
MetaException
IContentURI bind(IURI name, IContentStore content) throws MetaException
name
- - unique URI for this content. This should be in a form of file path:
/segment1/segment2/.../filename.extcontent
- object representing content to be boundIContentStore
directly using PortalSystem.lookup(com.webmethods.portal.system.IURI)
methodMetaException
IContentURI bindAsync(IURI name, IContentStore content, IContentEventListener eventListener) throws MetaException
name
- - unique URI for this content. This should be in a form of file path:
/segment1/segment2/.../filename.extcontent
- object representing content to be boundeventListener
- registered object to be notified upon operation completionIContentStore
directly using PortalSystem.lookup(com.webmethods.portal.system.IURI)
methodMetaException
IContentStore lookup(IURI name) throws MetaException
IContentStore
by its uriname
- unique URI for contentMetaException
IContentStore lookup(IURI name, String mime) throws MetaException
name
- unique URI for contentmime
- mime type of content to lookup. This value will override any mime type
specified directly in the content uri. This parameter may be null.MetaException
IContentURI copy(IURI from, IURI to, String[] mimeTypes) throws MetaException
from
- source urito
- target urimimeTypes
- list of mime types to copy. This parameter may be null,
in this case all mime types are copied.MetaException
void createRoot(IURI name) throws MetaException
name
- folder uri to createMetaException
boolean destroy(IURI name) throws MetaException
name
- unique URI for contentMetaException
void destroyRoot(IURI name) throws MetaException
name
- unique URI for contentMetaException
IURI generateContentURI(String key1, String key2) throws MetaException
key1
- name of thingkey2
- DB ID of thingMetaException
IContentURI[] listRoots(IURI root) throws MetaException
root
- URI for the root key. May be empty to enumerate roots under service rootMetaException
IContentURI[] listContents(IURI root) throws MetaException
root
- URI for the root key. May be empty to enumerate roots under service rootMetaException
int registerEventListener(Object eventListener) throws MetaException
MetaException
void unregisterEventListener(Object eventListener) throws MetaException
eventListener
- instance of event listener for asynchronous bind operationMetaException
boolean enableNotification(int listenerToken, boolean enable) throws MetaException
listenerToken
- unique listener token returned by RegisterEventListenerenable
- flag to enable/disable notification for this listenerMetaException
IContentService cloneService() throws MetaException
MetaException
boolean isAvailable()
String getContentServiceName()
IContentURI acquireURI(String uri)
uri
- IContentURI acquireURI(IURI uri)
uri
- uri for content itemIContentURI
that reprensent original urivoid updateConfiguration(IThingID serviceID, Element configElem) throws MetaException
MetaException