|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
ChangeItemBean |
createAttachment(File file,
String filename,
String contentType,
User remoteUser,
org.ofbiz.core.entity.GenericValue issue)
|
ChangeItemBean |
createAttachment(File file,
String filename,
String contentType,
User remoteUser,
org.ofbiz.core.entity.GenericValue issue,
Map attachmentProperties,
Date createdTime)
Create an attachment both on disk, and in the database. |
Attachment |
createAttachment(org.ofbiz.core.entity.GenericValue issue,
User author,
String mimetype,
String filename,
Long filesize,
Map attachmentProperties,
Date createdTime)
Create an attachment in the database. |
void |
deleteAttachment(Attachment attachment)
Delete an attachment from the database and from disk |
void |
deleteAttachmentDirectory(org.ofbiz.core.entity.GenericValue issue)
Delete the attachment directory from disk if the directory is empty |
Attachment |
getAttachment(Long id)
Get a single attachment by its id |
List |
getAttachments(org.ofbiz.core.entity.GenericValue issue)
Get a list of all attachments for a certain issue |
List |
getAttachments(Issue issue)
Get a list of all attachments for a certain issue |
boolean |
isAttachable(User user,
org.ofbiz.core.entity.GenericValue entity)
Determine if this user can attach a file to this issue. |
boolean |
isAttachable(User user,
org.ofbiz.core.entity.GenericValue entity,
boolean issueCreation)
|
Method Detail |
public Attachment getAttachment(Long id) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public List getAttachments(org.ofbiz.core.entity.GenericValue issue) throws DataAccessException
Attachment
objects
DataAccessException
public List getAttachments(Issue issue) throws DataAccessException
Attachment
objects
DataAccessException
public ChangeItemBean createAttachment(File file, String filename, String contentType, User remoteUser, org.ofbiz.core.entity.GenericValue issue, Map attachmentProperties, Date createdTime) throws AttachmentException, org.ofbiz.core.entity.GenericEntityException
file
- A file on a locally accessible filesystemfilename
- The desired filename for this attachment. This may be different to the filename on disk (for example with temp files used in file uploads)contentType
- The desired contentType. Implementations of this interface can choose to override this value as appropriateremoteUser
- The use who created this attachmentissue
- The issue that this attachment is attached toattachmentProperties
- Attachment properties (a Map of String -> Object properties). These are optional,
and are used to populate a PropertySet on the Attachment (Attachment.getProperties()
. Pass null to set no propertiescreatedTime
-
AttachmentException
org.ofbiz.core.entity.GenericEntityException
public ChangeItemBean createAttachment(File file, String filename, String contentType, User remoteUser, org.ofbiz.core.entity.GenericValue issue) throws AttachmentException, org.ofbiz.core.entity.GenericEntityException
AttachmentException
org.ofbiz.core.entity.GenericEntityException
public Attachment createAttachment(org.ofbiz.core.entity.GenericValue issue, User author, String mimetype, String filename, Long filesize, Map attachmentProperties, Date createdTime) throws org.ofbiz.core.entity.GenericEntityException
attachmentProperties
- Attachment properties (a Map of String -> Object properties).createdTime
-
org.ofbiz.core.entity.GenericEntityException
public void deleteAttachment(Attachment attachment) throws org.ofbiz.core.entity.GenericEntityException, RemoveException
RemoveException
- if the attachment cannot be removed from the disk
org.ofbiz.core.entity.GenericEntityException
public void deleteAttachmentDirectory(org.ofbiz.core.entity.GenericValue issue) throws RemoveException, org.ofbiz.core.entity.GenericEntityException
issue
- the attachment directory for the issue
RemoveException
- if the directory can not be removed or is not empty
org.ofbiz.core.entity.GenericEntityException
public boolean isAttachable(User user, org.ofbiz.core.entity.GenericValue entity)
entity
- Either a project or an Issuepublic boolean isAttachable(User user, org.ofbiz.core.entity.GenericValue entity, boolean issueCreation)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |