de.uplanet.lucy.server.dataobjects.impl
Class FileValueHolder

java.lang.Object
  extended by de.uplanet.lucy.server.dataobjects.impl.FileValueHolder
All Implemented Interfaces:
IFileValueHolder, IValueHolder<VHFileDescriptor>

public class FileValueHolder
extends java.lang.Object
implements IFileValueHolder

Holds information about a file. Depending on the value of WebOnly, not all information is available (true -> only path available).

Version:
$Revision: 75514 $

Constructor Summary
FileValueHolder()
          Standard constructor.
FileValueHolder(java.lang.String p_strFileName, java.lang.String p_strPath, java.lang.String p_strContentType, boolean p_bRefDown)
           
FileValueHolder(VHFileDescriptor p_descriptor)
           
 
Method Summary
 java.lang.String getCanonicalLexicalRepresentation()
          Get the canonical lexical representation of this value according to it's datatype.
 java.lang.String getContentType()
           
 java.lang.String getFileName()
           
 java.lang.String getFileRecId()
           
 java.lang.String getPath()
           
 java.lang.Object getRawValue()
          Get the raw data that this value holder holds.
 javax.xml.namespace.QName getType()
          The type of data this value holder holds.
 VHFileDescriptor getValue()
          Get the data that this value holder holds.
 boolean hasValue()
          Check if this value holder currently holds data or not.
 boolean isDownloadByReference()
           
 boolean isStreamingDownload()
           
 void setFileRecId(java.lang.String p_strRecId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileValueHolder

public FileValueHolder()
Standard constructor.


FileValueHolder

public FileValueHolder(java.lang.String p_strFileName,
                       java.lang.String p_strPath,
                       java.lang.String p_strContentType,
                       boolean p_bRefDown)
Parameters:
p_strFileName - The name of the file
p_strPath - The path to the file
p_strContentType - The MIME content type
p_bRefDown - True if download by reference

FileValueHolder

public FileValueHolder(VHFileDescriptor p_descriptor)
Parameters:
p_descriptor - A file descriptor.
Method Detail

isDownloadByReference

public boolean isDownloadByReference()
Specified by:
isDownloadByReference in interface IFileValueHolder

isStreamingDownload

public boolean isStreamingDownload()
Specified by:
isStreamingDownload in interface IFileValueHolder
Returns:
true for streaming download, or false otherwise.

getFileName

public java.lang.String getFileName()
Specified by:
getFileName in interface IFileValueHolder
Returns:
The name of the file or null if WebOnly

getPath

public java.lang.String getPath()
Specified by:
getPath in interface IFileValueHolder
Returns:
The path to the file

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface IFileValueHolder
Returns:
The MIME content type or null if WebOnly.

getRawValue

public java.lang.Object getRawValue()
Description copied from interface: IValueHolder
Get the raw data that this value holder holds.

Specified by:
getRawValue in interface IValueHolder<VHFileDescriptor>
Returns:
The raw data.

getType

public javax.xml.namespace.QName getType()
Description copied from interface: IValueHolder
The type of data this value holder holds.

Specified by:
getType in interface IValueHolder<VHFileDescriptor>

getValue

public VHFileDescriptor getValue()
Description copied from interface: IValueHolder
Get the data that this value holder holds.

Implementations MUST ensure that multiple calls to this method will return values that equal each other.

Specified by:
getValue in interface IValueHolder<VHFileDescriptor>
Returns:
The data.

hasValue

public boolean hasValue()
Description copied from interface: IValueHolder
Check if this value holder currently holds data or not.

Specified by:
hasValue in interface IValueHolder<VHFileDescriptor>
Returns:
true if the data holder holds data, or false otherwise.

getCanonicalLexicalRepresentation

public java.lang.String getCanonicalLexicalRepresentation()
Description copied from interface: IValueHolder
Get the canonical lexical representation of this value according to it's datatype.

Specified by:
getCanonicalLexicalRepresentation in interface IValueHolder<VHFileDescriptor>
Returns:
The canonical lexical representation, or null if such a representation does not exist (e.g. if IValueHolder.hasValue() returns false).

getFileRecId

public java.lang.String getFileRecId()
Specified by:
getFileRecId in interface IFileValueHolder

setFileRecId

public void setFileRecId(java.lang.String p_strRecId)
Specified by:
setFileRecId in interface IFileValueHolder


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.