spcp7.imagegallery.abstractionlayer.util
Class ContentDTO

java.lang.Object
  extended by spcp7.imagegallery.abstractionlayer.util.ContentDTO
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ContentFace>, ContentFace

public class ContentDTO
extends java.lang.Object
implements ContentFace, java.lang.Comparable<ContentFace>, java.io.Serializable

If contemt is returned this implementation of the ContentFace should be used.

Author:
Phillip Merensky
See Also:
Serialized Form

Constructor Summary
ContentDTO()
          Empty default constructor.
 
Method Summary
 int compareTo(ContentFace cf)
          Will be string compared by its getName().
 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 contentProviderTypeId)
          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> parentContentFolderProperties)
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentDTO

public ContentDTO()
Empty default constructor.

Method Detail

getFileExtension

public java.lang.String getFileExtension()
Description copied from interface: ContentFace
The file extension of this content. Can be something like eg. jpg, png etc.

Specified by:
getFileExtension in interface ContentFace
Returns:
String the file extension
See Also:
ContentFace.getFileExtension()

getName

public java.lang.String getName()
Description copied from interface: ContentFace
The name of this content for display purposes.

Specified by:
getName in interface ContentFace
Returns:
String the name
See Also:
ContentFace.getName()

getPath

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

Specified by:
getPath in interface ContentFace
Returns:
String the path
See Also:
ContentFace.getPath()

getUrl

public java.lang.String getUrl()
Description copied from interface: ContentFace
This method returns the http retrievable url of this content instance.

Specified by:
getUrl in interface ContentFace
Returns:
String the url of this content instance.
See Also:
ContentFace.getUrl()

setFileExtension

public void setFileExtension(java.lang.String fileExtension)
Specified by:
setFileExtension in interface ContentFace
Parameters:
fileExtension - The file extension of this content.
See Also:
ContentFace.setFileExtension(java.lang.String)

setName

public void setName(java.lang.String name)
Specified by:
setName in interface ContentFace
Parameters:
name - The new name of this content.
See Also:
ContentFace.setName(java.lang.String)

setPath

public void setPath(java.lang.String path)
Specified by:
setPath in interface ContentFace
Parameters:
path - The path to set
See Also:
ContentFace.setPath(java.lang.String)

setUrl

public void setUrl(java.lang.String url)
Description copied from interface: ContentFace
Sets the url of this content instance

Specified by:
setUrl in interface ContentFace
Parameters:
url - the http retrievable url of this content instance.
See Also:
ContentFace.setUrl(java.lang.String)

getProprietaryId

public java.lang.String getProprietaryId()
Description copied from interface: ContentFace
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.

Specified by:
getProprietaryId in interface ContentFace
Returns:
the proprietary id of this content instance
See Also:
ContentFace.getProprietaryId()

setProprietaryId

public void setProprietaryId(java.lang.String id)
Description copied from interface: ContentFace
Sets the proprietary id.

Specified by:
setProprietaryId in interface ContentFace
See Also:
ContentFace.setProprietaryId(java.lang.String)

compareTo

public int compareTo(ContentFace cf)
Will be string compared by its getName().

Specified by:
compareTo in interface java.lang.Comparable<ContentFace>
See Also:
Comparable.compareTo(java.lang.Object)

isDirectory

public boolean isDirectory()
Description copied from interface: ContentFace
This method returns true if this content instance is a folder or folder like volume which can contain other volumes.

Specified by:
isDirectory in interface ContentFace
Returns:
boolean True if this is a directory, false otherwise
See Also:
ContentFace.isDirectory()

isImage

public boolean isImage()
Description copied from interface: ContentFace
This method returns true if this content instance is an image

Specified by:
isImage in interface ContentFace
Returns:
boolean True if this is an image, false otherwise
See Also:
ContentFace.isImage()

setDirectory

public void setDirectory(boolean directory)
Specified by:
setDirectory in interface ContentFace
Parameters:
directory - True if this is a directory otherwise false
See Also:
ContentFace.setDirectory(boolean)

setImage

public void setImage(boolean image)
Specified by:
setImage in interface ContentFace
Parameters:
image - True if this is an image, false otherwise
See Also:
ContentFace.setImage(boolean)

getParentContentFolderProperties

public java.util.Map<java.lang.String,PropertyModelFace> getParentContentFolderProperties()
Specified by:
getParentContentFolderProperties in interface ContentFace
Returns:
the property map with which this content instance was created
See Also:
ContentFace.getParentContentFolderProperties()

setParentContentFolderProperties

public void setParentContentFolderProperties(java.util.Map<java.lang.String,PropertyModelFace> parentContentFolderProperties)
Specified by:
setParentContentFolderProperties in interface ContentFace
Parameters:
parentContentFolderProperties - The property map with which this content instance was created.
See Also:
ContentFace.setParentContentFolderProperties(java.util.Map)

getContentProviderTypeId

public java.lang.String getContentProviderTypeId()
Description copied from interface: ContentFace
Gets the typeId of the content provider which returned this content instance

Specified by:
getContentProviderTypeId in interface ContentFace
Returns:
The typeID of the corresponding content provider
See Also:
ContentFace.getContentProviderTypeId()

setContentProviderTypeId

public void setContentProviderTypeId(java.lang.String contentProviderTypeId)
Description copied from interface: ContentFace
Sets the typeID of the content provider which returned this content instance

Specified by:
setContentProviderTypeId in interface ContentFace
Parameters:
contentProviderTypeId - The content provider type Id
See Also:
ContentFace.setContentProviderTypeId(java.lang.String)


Copyright © 2008. All Rights Reserved.