Class ResourceConfig
- java.lang.Object
-
- org.apache.jackrabbit.webdav.simple.ResourceConfig
-
public class ResourceConfig extends Object
ResourceConfig
...
-
-
Constructor Summary
Constructors Constructor Description ResourceConfig(org.apache.tika.detect.Detector detector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CopyMoveManager
getCopyMoveManager()
DeleteManager
getDeleteManager()
Returns the delete manager.org.apache.tika.detect.Detector
getDetector()
Returns the configured content type detector.IOManager
getIOManager()
ItemFilter
getItemFilter()
Returns the item filter specified with the configuration orDefaultItemFilter
if the configuration was missing the corresponding entry or the parser failed to build aItemFilter
instance from the configuration.PropertyManager
getPropertyManager()
boolean
isCollectionResource(Item item)
Returns true, if the given item represents anode
that is either any of the nodetypes specified to represent a collection or none of the nodetypes specified to represent a non-collection, respectively.void
parse(InputStream stream)
Parses the given input stream into the xml configuration file.void
parse(URL configURL)
Tries to parse the given xml configuration file.
-
-
-
Method Detail
-
parse
public void parse(URL configURL)
Tries to parse the given xml configuration file. The xml must match the following structure:
<!ELEMENT config (iomanager, propertymanager, (collection | noncollection)?, filter?, mimetypeproperties?) > <!ELEMENT iomanager (class, iohandler*) > <!ELEMENT iohandler (class) > <!ELEMENT propertymanager (class, propertyhandler*) > <!ELEMENT propertyhandler (class) > <!ELEMENT collection (nodetypes) > <!ELEMENT noncollection (nodetypes) > <!ELEMENT filter (class, namespaces?, nodetypes?) > <!ELEMENT class > <!ATTLIST class name CDATA #REQUIRED > <!ELEMENT namespaces (prefix|uri)* > <!ELEMENT prefix (CDATA) > <!ELEMENT uri (CDATA) > <!ELEMENT nodetypes (nodetype)* > <!ELEMENT nodetype (CDATA) > <!ELEMENT mimetypeproperties (mimemapping*, defaultmimetype) > <!ELEMENT mimemapping > <!ATTLIST mimemapping extension CDATA #REQUIRED mimetype CDATA #REQUIRED > <!ELEMENT defaultmimetype (CDATA) >
The <mimetypeproperties/> settings have been deprecated and will be ignored with a warning. Instead you can use the
mime-info
servlet initialization parameter to customize the media type settings.- Parameters:
configURL
-
-
parse
public void parse(InputStream stream)
Parses the given input stream into the xml configuration file. The xml must match the following structure:
<!ELEMENT config (iomanager, propertymanager, (collection | noncollection)?, filter?, mimetypeproperties?) > <!ELEMENT iomanager (class, iohandler*) > <!ELEMENT iohandler (class) > <!ELEMENT propertymanager (class, propertyhandler*) > <!ELEMENT propertyhandler (class) > <!ELEMENT collection (nodetypes) > <!ELEMENT noncollection (nodetypes) > <!ELEMENT filter (class, namespaces?, nodetypes?) > <!ELEMENT class > <!ATTLIST class name CDATA #REQUIRED > <!ELEMENT namespaces (prefix|uri)* > <!ELEMENT prefix (CDATA) > <!ELEMENT uri (CDATA) > <!ELEMENT nodetypes (nodetype)* > <!ELEMENT nodetype (CDATA) > <!ELEMENT mimetypeproperties (mimemapping*, defaultmimetype) > <!ELEMENT mimemapping > <!ATTLIST mimemapping extension CDATA #REQUIRED mimetype CDATA #REQUIRED > <!ELEMENT defaultmimetype (CDATA) >
The <mimetypeproperties/> settings have been deprecated and will be ignored with a warning. Instead you can use the
mime-info
servlet initialization parameter to customize the media type settings.- Parameters:
stream
-
-
getIOManager
public IOManager getIOManager()
- Returns:
-
getPropertyManager
public PropertyManager getPropertyManager()
- Returns:
-
getCopyMoveManager
public CopyMoveManager getCopyMoveManager()
- Returns:
-
getDeleteManager
public DeleteManager getDeleteManager()
Returns the delete manager.- Returns:
- the delete manager
-
isCollectionResource
public boolean isCollectionResource(Item item)
Returns true, if the given item represents anode
that is either any of the nodetypes specified to represent a collection or none of the nodetypes specified to represent a non-collection, respectively. If no valid configuration entry is present, this method returns true for node items. For items which are not a node, this method always returns false.- Parameters:
item
-- Returns:
- true if the given item is a node that represents a webdav collection, false otherwise.
-
getItemFilter
public ItemFilter getItemFilter()
Returns the item filter specified with the configuration orDefaultItemFilter
if the configuration was missing the corresponding entry or the parser failed to build aItemFilter
instance from the configuration.- Returns:
- item filter as defined by the config or
DefaultItemFilter
-
getDetector
public org.apache.tika.detect.Detector getDetector()
Returns the configured content type detector.- Returns:
- content type detector
-
-