org.modeshape.connector.filesystem
Class BasePropertiesFactory

java.lang.Object
  extended by org.modeshape.connector.filesystem.BasePropertiesFactory
All Implemented Interfaces:
Serializable, CustomPropertiesFactory
Direct Known Subclasses:
IgnoreProperties, LogProperties, StoreProperties, ThrowProperties

public abstract class BasePropertiesFactory
extends Object
implements CustomPropertiesFactory

A base class for CustomPropertiesFactory implementations that handle "extra" or "custom" properties for 'nt:file', 'nt:folder', or 'nt:resource' nodes.

See Also:
Serialized Form

Field Summary
protected static Set<Name> NO_NAMES
           
protected static Collection<Property> NO_PROPERTIES_COLLECTION
           
protected  Set<Name> STANDARD_PROPERTIES_FOR_CONTENT
          Only certain properties are tolerated when writing content (dna:resource or jcr:resource) nodes.
protected  Set<Name> STANDARD_PROPERTIES_FOR_FILE_OR_FOLDER
          Only certain properties are tolerated when writing files (nt:file) or folders (nt:folder) nodes.
 
Constructor Summary
protected BasePropertiesFactory()
          Create an instance of this factory.
 
Method Summary
 FilenameFilter getFilenameFilter(FilenameFilter exclusionFilter)
          Create a filename filter that will ignore any files needed by this implementation.
 File propertiesFileForFile(File file)
          Returns the file used for storing extra properties for files.
 File propertiesFileForFolder(File folder)
          Returns the file used for storing extra properties for folders.
 File propertiesFileForResource(File resource)
          Returns the file used for storing properties for resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.modeshape.connector.filesystem.CustomPropertiesFactory
getDirectoryProperties, getFileProperties, getResourceProperties, recordDirectoryProperties, recordFileProperties, recordResourceProperties
 

Field Detail

STANDARD_PROPERTIES_FOR_CONTENT

protected final Set<Name> STANDARD_PROPERTIES_FOR_CONTENT
Only certain properties are tolerated when writing content (dna:resource or jcr:resource) nodes. These properties are implicitly stored (primary type, data) or silently ignored (encoded, mimetype, last modified). The silently ignored properties must be accepted to stay compatible with the JCR specification.


STANDARD_PROPERTIES_FOR_FILE_OR_FOLDER

protected final Set<Name> STANDARD_PROPERTIES_FOR_FILE_OR_FOLDER
Only certain properties are tolerated when writing files (nt:file) or folders (nt:folder) nodes. These properties are implicitly stored in the file or folder (primary type, created).


NO_PROPERTIES_COLLECTION

protected static final Collection<Property> NO_PROPERTIES_COLLECTION

NO_NAMES

protected static final Set<Name> NO_NAMES
Constructor Detail

BasePropertiesFactory

protected BasePropertiesFactory()
Create an instance of this factory.

Method Detail

getFilenameFilter

public FilenameFilter getFilenameFilter(FilenameFilter exclusionFilter)
Create a filename filter that will ignore any files needed by this implementation.

Parameters:
exclusionFilter - the default filter, which should be included; may be null if there is no such filter
Returns:
the filter

propertiesFileForFile

public File propertiesFileForFile(File file)
Description copied from interface: CustomPropertiesFactory
Returns the file used for storing extra properties for files.

Specified by:
propertiesFileForFile in interface CustomPropertiesFactory
Parameters:
file - a non-null File representing an existing file.
Returns:
the file in which the properties are be stored or null if custom properties are not supported

propertiesFileForFolder

public File propertiesFileForFolder(File folder)
Description copied from interface: CustomPropertiesFactory
Returns the file used for storing extra properties for folders.

Specified by:
propertiesFileForFolder in interface CustomPropertiesFactory
Parameters:
folder - a non-null File representing an existing folder.
Returns:
the file in which the properties are be stored or null if custom properties are not supported

propertiesFileForResource

public File propertiesFileForResource(File resource)
Description copied from interface: CustomPropertiesFactory
Returns the file used for storing properties for resources.

Specified by:
propertiesFileForResource in interface CustomPropertiesFactory
Parameters:
resource - a non-null File representing an existing file.
Returns:
the file in which the properties are be stored or null if custom properties are not supported


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.