com.dotmarketing.portlets.files.model
Class File

java.lang.Object
  extended by com.dotmarketing.beans.Inode
      extended by com.dotmarketing.beans.WebAsset
          extended by com.dotmarketing.portlets.files.model.File
All Implemented Interfaces:
UUIDable, Permissionable, Versionable, Categorizable, java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
MP3File

public class File
extends WebAsset
implements java.io.Serializable

Author:
Hibernate CodeGenerator
See Also:
Serialized Form

Field Summary
static java.lang.String UNKNOWN_MIME_TYPE
           
 
Fields inherited from class com.dotmarketing.beans.Inode
inode, owner
 
Constructor Summary
File()
          default constructor
 
Method Summary
 java.util.List<PermissionSummary> acceptedPermissions()
          Returns the list of accepted permission of this permissionable (I.E.
 int compareTo(File compObject)
           
 void copy(File newFile)
           
 boolean equals(java.lang.Object other)
           
 java.lang.String getAuthor()
          Returns the author.
 java.lang.String[] getCategories()
          Returns the categories.
 java.lang.String getExtension()
           
 java.lang.String getFileName()
           
 int getHeight()
          Returns the height.
 java.lang.String getInode()
           
 java.util.Map<java.lang.String,java.lang.Object> getMap()
          This method returns a map with all the file attributes
 int getMaxHeight()
          Returns the maxHeight.
 int getMaxSize()
          Returns the maxSize.
 int getMaxWidth()
          Returns the maxWidth.
 java.lang.String getMimeType()
          Returns the mimeType.
 int getMinHeight()
          Returns the minHeight.
 java.lang.String getNameOnly()
           
 java.lang.String getParent()
          Returns the parent.
 Permissionable getParentPermissionable()
          Retrieves the parent permissionable in the chain of permissions inheritance
 java.lang.String getPath()
           
 java.util.Date getPublishDate()
          Returns the publishDate.
 int getSize()
           
 java.lang.String getURI()
           
 java.lang.String getURI(Folder folder)
           
 int getWidth()
          Returns the width.
 int hashCode()
           
 void setAuthor(java.lang.String author)
          Sets the author.
 void setCategories(java.lang.String[] categories)
          Sets the categories.
 void setFileName(java.lang.String fileName)
           
 void setHeight(int height)
          Sets the height.
 void setInode(java.lang.String inode)
          Sets the inode.
 void setMaxHeight(int maxHeight)
          Sets the maxHeight.
 void setMaxSize(int maxSize)
          Sets the maxSize.
 void setMaxWidth(int maxWidth)
          Sets the maxWidth.
 void setMimeType(java.lang.String mimeType)
          Sets the mimeType.
 void setMinHeight(int minHeight)
          Sets the minHeight.
 void setParent(java.lang.String parent)
          Sets the parent.
 void setPublishDate(java.util.Date publishDate)
          Sets the publishDate.
 void setSize(int size)
           
 void setWidth(int width)
          Sets the width.
 java.lang.String toString()
           
 
Methods inherited from class com.dotmarketing.beans.WebAsset
copy, getFriendlyName, getModDate, getModUser, getOwner, getPermissionId, getSortOrder, getTitle, getVersionId, isArchived, isDeleted, isLive, isLocked, isShowOnMenu, isWorking, setDeleted, setFriendlyName, setLive, setLocked, setModDate, setModUser, setShowOnMenu, setSortOrder, setTitle, setWorking
 
Methods inherited from class com.dotmarketing.beans.Inode
addChild, addChild, addChild, addParent, addParent, compareTo, deleteChild, deleteChild, deleteParent, deleteParent, getCategoryId, getiDate, getIDate, getIdentifier, getPermissionType, getType, getVersionType, hasChildren, hasParents, isNew, isParentPermissionable, permissionDependencies, setiDate, setIDate, setIDate, setIdentifier, setOwner, setParents, setType, setVersionId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.dotmarketing.business.Permissionable
getPermissionType, isParentPermissionable, permissionDependencies, setOwner
 
Methods inherited from interface com.dotmarketing.business.Versionable
getVersionType, setVersionId
 

Field Detail

UNKNOWN_MIME_TYPE

public static final java.lang.String UNKNOWN_MIME_TYPE
See Also:
Constant Field Values
Constructor Detail

File

public File()
default constructor

Method Detail

getURI

public java.lang.String getURI(Folder folder)
Specified by:
getURI in class WebAsset

getURI

public java.lang.String getURI()

getPath

public java.lang.String getPath()

getInode

public java.lang.String getInode()
Specified by:
getInode in interface UUIDable
Specified by:
getInode in interface Versionable
Overrides:
getInode in class Inode

setInode

public void setInode(java.lang.String inode)
Description copied from class: Inode
Sets the inode.

Specified by:
setInode in interface UUIDable
Overrides:
setInode in class Inode
Parameters:
inode - The inode to set

getFileName

public java.lang.String getFileName()

setFileName

public void setFileName(java.lang.String fileName)

getSize

public int getSize()

setSize

public void setSize(int size)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class Inode

hashCode

public int hashCode()
Overrides:
hashCode in class Inode

getMaxHeight

public int getMaxHeight()
Returns the maxHeight.

Returns:
int

getMaxSize

public int getMaxSize()
Returns the maxSize.

Returns:
int

getMaxWidth

public int getMaxWidth()
Returns the maxWidth.

Returns:
int

getMinHeight

public int getMinHeight()
Returns the minHeight.

Returns:
int

setMaxHeight

public void setMaxHeight(int maxHeight)
Sets the maxHeight.

Parameters:
maxHeight - The maxHeight to set

setMaxSize

public void setMaxSize(int maxSize)
Sets the maxSize.

Parameters:
maxSize - The maxSize to set

setMaxWidth

public void setMaxWidth(int maxWidth)
Sets the maxWidth.

Parameters:
maxWidth - The maxWidth to set

setMinHeight

public void setMinHeight(int minHeight)
Sets the minHeight.

Parameters:
minHeight - The minHeight to set

getParent

public java.lang.String getParent()
Returns the parent.

Returns:
String

setParent

public void setParent(java.lang.String parent)
Sets the parent.

Parameters:
parent - The parent to set

copy

public void copy(File newFile)

getMimeType

public java.lang.String getMimeType()
Returns the mimeType.

Returns:
String

setMimeType

public void setMimeType(java.lang.String mimeType)
Sets the mimeType.

Parameters:
mimeType - The mimeType to set

getHeight

public int getHeight()
Returns the height.

Returns:
int

getWidth

public int getWidth()
Returns the width.

Returns:
int

getExtension

public java.lang.String getExtension()

getNameOnly

public java.lang.String getNameOnly()

setHeight

public void setHeight(int height)
Sets the height.

Parameters:
height - The height to set

setWidth

public void setWidth(int width)
Sets the width.

Parameters:
width - The width to set

compareTo

public int compareTo(File compObject)

getAuthor

public java.lang.String getAuthor()
Returns the author.

Returns:
String

getPublishDate

public java.util.Date getPublishDate()
Returns the publishDate.

Returns:
java.util.Date

setAuthor

public void setAuthor(java.lang.String author)
Sets the author.

Parameters:
author - The author to set

setPublishDate

public void setPublishDate(java.util.Date publishDate)
Sets the publishDate.

Parameters:
publishDate - The publishDate to set

getCategories

public java.lang.String[] getCategories()
Returns the categories.

Returns:
String[]

setCategories

public void setCategories(java.lang.String[] categories)
Sets the categories.

Parameters:
categories - The categories to set

getMap

public java.util.Map<java.lang.String,java.lang.Object> getMap()
This method returns a map with all the file attributes

Overrides:
getMap in class WebAsset
Returns:
the map

acceptedPermissions

public java.util.List<PermissionSummary> acceptedPermissions()
Description copied from interface: Permissionable
Returns the list of accepted permission of this permissionable (I.E. content accepts permissions to view, edit, publish, and edit permissions)

Specified by:
acceptedPermissions in interface Permissionable
Overrides:
acceptedPermissions in class Inode
Returns:

getParentPermissionable

public Permissionable getParentPermissionable()
                                       throws DotDataException
Description copied from interface: Permissionable
Retrieves the parent permissionable in the chain of permissions inheritance

Specified by:
getParentPermissionable in interface Permissionable
Overrides:
getParentPermissionable in class Inode
Returns:
Throws:
DotDataException


Copyright © 2010 dotCMS Inc. All Rights Reserved.