|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.content.selector.XPathContentWorkerSelector
public class XPathContentWorkerSelector
A selector that executes a set of XPath statements against the XML document to determine which content worker to provide. The XPath rules are simple, i.e. if an XML node is found by the XPath statement, then it is considered to be a hit and the corresponding worker is returned.
Currently, the only namespaces supported are those contained in the XML documents being tested.
Constructor Summary | |
---|---|
XPathContentWorkerSelector()
|
Method Summary | |
---|---|
ContentWorker |
getWorker(org.alfresco.service.cmr.repository.ContentReader reader)
Execute the XPath statements, in order, against the document. |
void |
init()
Checks the configuration. |
void |
setSupportedMimetypes(java.util.Set supportedMimetypes)
Optionally set the mimetypes supported. |
void |
setWorkers(java.util.Map workers)
Set the workers to use. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XPathContentWorkerSelector()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void setSupportedMimetypes(java.util.Set supportedMimetypes)
supportedMimetypes
- the list of mimetypes. The default is text/xml.public void setWorkers(java.util.Map workers)
workers
- a map of ContentWorker instances
keyed by XPath statementspublic void init()
public ContentWorker getWorker(org.alfresco.service.cmr.repository.ContentReader reader)
getWorker
in interface ContentWorkerSelector
reader
- the content reader, providing the actual stream metadata
and even the stream, if required.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |