spcp7.imagegallery.abstractionlayer.face
Interface ContentFace

All Known Subinterfaces:
ImageFace
All Known Implementing Classes:
ContentDTO, ContentImpl

public interface ContentFace

If an implementation of a ContentProviderFace returns content it must implement this interface.

Author:
Phillip Merensky

Method Summary
 java.lang.String getContentProviderTypeId()
          Gets the typeId of the content provider which returned this content instance
 java.lang.String getFileExtension()
          The file extension of this content.
 java.lang.String getName()
          The name of this content for display purposes.
 java.util.Map<java.lang.String,PropertyModelFace> getParentContentFolderProperties()
           
 java.lang.String getPath()
          This method returns the full system path to this content.
 java.lang.String getProprietaryId()
          This method should get the proprietary id of the content instance.
 java.lang.String getUrl()
          This method returns the http retrievable url of this content instance.
 boolean isDirectory()
          This method returns true if this content instance is a folder or folder like volume which can contain other volumes.
 boolean isImage()
          This method returns true if this content instance is an image
 void setContentProviderTypeId(java.lang.String typeId)
          Sets the typeID of the content provider which returned this content instance
 void setDirectory(boolean directory)
           
 void setFileExtension(java.lang.String fileExtension)
           
 void setImage(boolean image)
           
 void setName(java.lang.String name)
           
 void setParentContentFolderProperties(java.util.Map<java.lang.String,PropertyModelFace> properties)
           
 void setPath(java.lang.String path)
           
 void setProprietaryId(java.lang.String id)
          Sets the proprietary id.
 void setUrl(java.lang.String url)
          Sets the url of this content instance
 

Method Detail

setContentProviderTypeId

void setContentProviderTypeId(java.lang.String typeId)
Sets the typeID of the content provider which returned this content instance

Parameters:
typeId - The content provider type Id

getContentProviderTypeId

java.lang.String getContentProviderTypeId()
Gets the typeId of the content provider which returned this content instance

Returns:
The typeID of the corresponding content provider

getParentContentFolderProperties

java.util.Map<java.lang.String,PropertyModelFace> getParentContentFolderProperties()
Returns:
the property map with which this content instance was created

setParentContentFolderProperties

void setParentContentFolderProperties(java.util.Map<java.lang.String,PropertyModelFace> properties)
Parameters:
properties - The property map with which this content instance was created.

getProprietaryId

java.lang.String getProprietaryId()
This method should get the proprietary id of the content instance. The proprietary id is an identification which is unique within the underlying content provider. In a filesystem this could be an absolute, canonical path, within alfresco it is for example the node id.

Returns:
the proprietary id of this content instance

setProprietaryId

void setProprietaryId(java.lang.String id)
Sets the proprietary id.

Parameters:
id -
See Also:
getProprietaryId()

getUrl

java.lang.String getUrl()
This method returns the http retrievable url of this content instance.

Returns:
String the url of this content instance.

setUrl

void setUrl(java.lang.String url)
Sets the url of this content instance

Parameters:
url - the http retrievable url of this content instance.
See Also:
getProprietaryId()

getPath

java.lang.String getPath()
This method returns the full system path to this content. Do not confuse with getProprietaryId() because this must be a real full path like "/test/test2/test.jpg".

Returns:
String the path

setPath

void setPath(java.lang.String path)
Parameters:
path - The path to set
See Also:
getPath()

getName

java.lang.String getName()
The name of this content for display purposes.

Returns:
String the name

setName

void setName(java.lang.String name)
Parameters:
name - The new name of this content.
See Also:
getName()

getFileExtension

java.lang.String getFileExtension()
The file extension of this content. Can be something like eg. jpg, png etc.

Returns:
String the file extension

setFileExtension

void setFileExtension(java.lang.String fileExtension)
Parameters:
fileExtension - The file extension of this content.
See Also:
getFileExtension()

isDirectory

boolean isDirectory()
This method returns true if this content instance is a folder or folder like volume which can contain other volumes.

Returns:
boolean True if this is a directory, false otherwise

setDirectory

void setDirectory(boolean directory)
Parameters:
directory - True if this is a directory otherwise false
See Also:
isDirectory()

isImage

boolean isImage()
This method returns true if this content instance is an image

Returns:
boolean True if this is an image, false otherwise

setImage

void setImage(boolean image)
Parameters:
image - True if this is an image, false otherwise
See Also:
isImage()


Copyright © 2008. All Rights Reserved.