spcp7.imagegallery.contentprovider.face
Interface ContentProviderFace

All Known Implementing Classes:
AlfrescoContentProviderImpl

public interface ContentProviderFace

Classes implementing this interface define the entry point for working with a specified content provider. All instances for content actions of a specific content provider can be retrieved from this class.


Method Summary
 ContentManipulationFace getContentManipulatorInstance()
          This method returns the singleton content manipulation instance of the content provider.
 java.lang.String getContentProviderTypeID()
          This id must be unique under all content provider.
 ContentRetrievalFace getContentRetrievalInstance()
          This method returns the singleton content retrieval instance of the content provider.
 ContentSubmitterFace getContentSubmitterInstance()
          This method returns the singleton content submitter instance of the content provider.
 java.util.Map<java.lang.String,PropertyModelFace> getDefaultProperties()
          This method returns the default properties of this content provider.
 java.lang.String getName()
          Only for convenience.
 boolean manipulationSupported()
           
 boolean submissionSupported()
           
 

Method Detail

getName

java.lang.String getName()
Only for convenience.
This should also return the contentProviderTypeID (getContentProviderTypeID()).

Returns:
String The contentProviderTypeID

submissionSupported

boolean submissionSupported()
Returns:
boolean true if submission is supported, false otherwise

manipulationSupported

boolean manipulationSupported()
Returns:
boolean true if manipulation is supported, false otherwise.

getContentRetrievalInstance

ContentRetrievalFace getContentRetrievalInstance()
This method returns the singleton content retrieval instance of the content provider. Content Retrieval must be implemented for every content provider.

Returns:
the singleton content retrieval instance of this content provider.

getContentSubmitterInstance

ContentSubmitterFace getContentSubmitterInstance()
                                                 throws FeatureNotProvidedException
This method returns the singleton content submitter instance of the content provider. Content submission may be implemented for a content provider. If it is not an exception will be thrown.

Returns:
the singleton content submitter instance of this content provider.
Throws:
FeatureNotProvidedException - If this feature is not supported for this content provider.

getContentManipulatorInstance

ContentManipulationFace getContentManipulatorInstance()
                                                      throws FeatureNotProvidedException
This method returns the singleton content manipulation instance of the content provider. Content manipulation may be implemented for a content provider. If it is not an exception will be thrown.

Returns:
the singleton content manipulation instance of this content provider.
Throws:
FeatureNotProvidedException - If this feature is not supported for this content provider.

getContentProviderTypeID

java.lang.String getContentProviderTypeID()
This id must be unique under all content provider. That is why you should define a name which will extremely unlikely collide with another name and which will also be self-explanatory for a user (eg spcp7.imagegallery.contentprovider.alfresco). It would be best if you use the "spcp7.imagegallery.contentprovider" prefix also.

IMPORTANT! This ID should if once set and used never be changed again!

Returns:
String the unique id of this content provider.

getDefaultProperties

java.util.Map<java.lang.String,PropertyModelFace> getDefaultProperties()
This method returns the default properties of this content provider. When a new content folder will be saved these defaults and the default of the content provider registry will be merged whereas these properties overwrite same properties from the content provider registry.

Returns:
a map with default properties. The key of this map (String) should be PropertyModelFace.getSchluessel().
See Also:
ContentProviderRegistryFace.getDefaultProperties()


Copyright © 2008. All Rights Reserved.