|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.fascinator.common.storage.impl.GenericPayload
public class GenericPayload
Generic Payload implementation
| Constructor Summary | |
|---|---|
GenericPayload(Payload payload)
Creates a copy of the specified payload |
|
GenericPayload(String id)
Creates an empty payload |
|
GenericPayload(String id,
File payloadFile)
Creates an file based payload |
|
GenericPayload(String id,
String label,
String contentType)
Creates a data payload with the specified identifier, label and content type, but no content stream |
|
GenericPayload(String id,
String label,
String contentType,
PayloadType payloadType)
Creates a data payload with the specified identifier, label, content type and payload type but no content stream |
|
| Method Summary | |
|---|---|
void |
close()
Close the input stream for this payload |
String |
getContentType()
Gets the content (MIME) type for this payload |
String |
getId()
Gets the identifier for this payload |
String |
getLabel()
Gets the descriptive label for this payload |
PayloadType |
getType()
Gets the type of this payload |
boolean |
hasMetaChanged()
Status of the metadata if it has changed |
boolean |
isLinked()
Returns whether the file is linked or stored |
Long |
lastModified()
Return the timestamp when the payload was last modified |
InputStream |
open()
Gets the input stream to access the content for this payload |
void |
setContentType(String contentType)
Sets the content (MIME) type for this payload |
void |
setId(String id)
Sets the identifier for this payload |
void |
setInputStream(InputStream in)
Sets the input stream to access the content for this payload. |
void |
setLabel(String label)
Sets the descriptive label for this payload |
void |
setLinked(boolean newLinked)
Set the link state |
void |
setMetaChanged(boolean metaChanged)
Set the metadata changed flag to a specific value. |
void |
setType(PayloadType type)
Sets the type of this payload |
Long |
size()
Return the size of the payload in byte |
String |
toString()
Gets the Payload identifier |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GenericPayload(String id)
id - an identifier
public GenericPayload(String id,
String label,
String contentType)
id - an identifierlabel - a descriptive labelcontentType - the content type
public GenericPayload(String id,
String label,
String contentType,
PayloadType payloadType)
id - an identifierlabel - a descriptive labelcontentType - the content typepayloadType - the payload type
public GenericPayload(String id,
File payloadFile)
id - an identifierpayloadFile - the file for the payloadpublic GenericPayload(Payload payload)
payload - payload to copy| Method Detail |
|---|
public boolean hasMetaChanged()
true if metadata has changed, false
otherwisepublic void setMetaChanged(boolean metaChanged)
metaChanged - public String getId()
getId in interface Payloadpublic void setId(String id)
setId in interface Payloadid - A string identifier for this payloadpublic PayloadType getType()
getType in interface Payloadpublic boolean isLinked()
isLinked in interface Payloadtrue if linked, false if storedpublic void setLinked(boolean newLinked)
newLinked - True if linked, otherwise falsepublic void setType(PayloadType type)
setType in interface PayloadA - PayloadTypepublic String getLabel()
getLabel in interface Payloadpublic void setLabel(String label)
setLabel in interface Payloada - String label for this payloadpublic String getContentType()
getContentType in interface Payloadpublic void setContentType(String contentType)
setContentType in interface Payloada - String MIME type
public InputStream open()
throws StorageException
open in interface PayloadIOException - if there was an error reading the stream
StorageException
public void close()
throws StorageException
close in interface PayloadStorageException - if there was an error closing the streampublic void setInputStream(InputStream in)
in - the content input streampublic String toString()
toString in class Objectpublic Long lastModified()
lastModified in interface Payloadpublic Long size()
size in interface Payload
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||