public abstract class BaseAsset extends Entity
Modifier and Type | Field and Description |
---|---|
protected static int |
STATE_ACTIVE |
protected static int |
STATE_CLOSED |
ASSET_STATE_VALUE, ASSET_VALUE, CHANGE_DATE_UTC, CONTENT_TYPE_VALUE, CONTENT_VALUE, CREATE_DATE_UTC, DELETE_OPERATION, DESCRIPTION_VALUE, FILENAME_VALUE, NAME_VALUE
Modifier and Type | Method and Description |
---|---|
boolean |
canClose() |
boolean |
canDelete() |
boolean |
canReactivate() |
void |
close()
Closes or Inactivates the item
|
Attachment |
createAttachment(String name,
String fileName,
InputStream stream)
Create an attachment that belongs to this asset.
|
Attachment |
createAttachment(String name,
String fileName,
InputStream stream,
Map<String,Object> attributes)
Create an attachment that belongs to this asset.
|
Conversation |
createConversation(Member author,
String content)
Creates conversation with an expression which mentioned this asset.
|
Conversation |
createConversation(Member author,
String content,
Map<String,Object> attributes)
Creates conversation with an expression which mentioned this asset.
|
Link |
createLink(String name,
String url,
boolean onMenu)
Create a link that belongs to this asset.
|
Link |
createLink(String name,
String url,
boolean onMenu,
Map<String,Object> attributes)
Create a link that belongs to this asset.
|
Note |
createNote(String name,
String content,
boolean personal)
Create a note that belongs to this asset.
|
Note |
createNote(String name,
String content,
boolean personal,
Map<String,Object> attributes)
Create a note that belongs to this asset.
|
void |
delete()
Deletes the Item
|
Collection<Attachment> |
getAttachments(AttachmentFilter filter) |
ICustomDropdownDictionary |
getCustomDropdown() |
ICustomAttributeDictionary |
getCustomField() |
String |
getDescription() |
Collection<Link> |
getLinks(LinkFilter filter) |
Collection<Expression> |
getMentionedInExpressions() |
String |
getName() |
Collection<Note> |
getNotes(NoteFilter filter) |
String |
getURL() |
boolean |
isActive() |
boolean |
isClosed() |
void |
reactivate()
Reactivates the item.
|
void |
setDescription(String value) |
void |
setName(String name) |
equals, get, getChangeComment, getChangeDate, getChangedBy, getCreateComment, getCreateDate, getCreatedBy, getID, getInstance, hashCode, save, save, toString
protected static final int STATE_CLOSED
protected static final int STATE_ACTIVE
public String getURL()
public String getName()
public void setName(String name)
name
- Name of the base asset.public String getDescription()
public void setDescription(String value)
value
- description of the base asset.public Collection<Expression> getMentionedInExpressions()
public Collection<Attachment> getAttachments(AttachmentFilter filter)
filter
- filter for getting a collection of attachments (If null,
then all items returned).public Collection<Note> getNotes(NoteFilter filter)
filter
- filter for getting a collection of notes (If null, then all
items returned).public Collection<Link> getLinks(LinkFilter filter)
filter
- Limit the link returned. If null, then all items returned.public boolean isActive()
public boolean isClosed()
public boolean canDelete()
public void delete() throws UnsupportedOperationException
UnsupportedOperationException
- if the item is an invalid state for
the Operation.public ICustomAttributeDictionary getCustomField()
public ICustomDropdownDictionary getCustomDropdown()
public Link createLink(String name, String url, boolean onMenu)
name
- The name of the link.url
- The url of the link.onMenu
- True if the link is visible on this asset's detail page
menu.public Link createLink(String name, String url, boolean onMenu, Map<String,Object> attributes)
name
- The name of the link.url
- The url of the link.onMenu
- True if the link is visible on this asset's detail page
menu.attributes
- additional attributes for the Link.public Note createNote(String name, String content, boolean personal)
name
- The name of the note.content
- The content of the note.personal
- True if the note is only visible to the currently logged
in user.public Note createNote(String name, String content, boolean personal, Map<String,Object> attributes)
name
- The name of the note.content
- The content of the note.personal
- True if the note is only visible to the currently logged
in user.attributes
- additional attributes for the Note.public Attachment createAttachment(String name, String fileName, InputStream stream) throws AttachmentLengthExceededException, ApplicationUnavailableException
name
- The name of the attachment.fileName
- The name of the original attachment file.stream
- The read-enabled stream that contains the attachment.
content to upload.Attachment
object with corresponding parameters.AttachmentLengthExceededException
- if attachment is too long.ApplicationUnavailableException
- if any problem appears during
connection to the server.public Attachment createAttachment(String name, String fileName, InputStream stream, Map<String,Object> attributes) throws AttachmentLengthExceededException, ApplicationUnavailableException
name
- The name of the attachment.fileName
- The name of the original attachment file.stream
- The read-enabled stream that contains the attachment.
content to upload.attributes
- additional attributes for the Attachment.Attachment
object with corresponding parameters.AttachmentLengthExceededException
- if attachment is too long.ApplicationUnavailableException
- if any problem appears during
connection to the server.public Conversation createConversation(Member author, String content)
author
- Author of conversation expression.content
- Content of conversation expression.public Conversation createConversation(Member author, String content, Map<String,Object> attributes)
author
- Author of conversation expression.content
- Content of conversation expression.attributes
- additional attributes for the Expression in the Conversation.public boolean canClose()
public void close() throws UnsupportedOperationException
UnsupportedOperationException
- if the item is an invalid state for
the Operation, e.g. it is already closed or inactive.public boolean canReactivate()
public void reactivate() throws UnsupportedOperationException
UnsupportedOperationException
- if the item is an invalid state for
the Operation, e.g. it is already open or active.Copyright © 2013 Version One, Inc.. All rights reserved.