com.trackstudio.securedkernel
Class SecuredAttachmentAdapterManager

java.lang.Object
  extended by com.trackstudio.securedkernel.SecuredAttachmentAdapterManager

public class SecuredAttachmentAdapterManager
extends java.lang.Object

This manager is used for creating and deleting of attachments


Field Summary
protected  java.lang.Class c
           
protected static org.apache.commons.logging.Log log
           
protected static ParameterValidator pv
           
 
Constructor Summary
SecuredAttachmentAdapterManager()
           
 
Method Summary
 java.util.ArrayList createAttachment(SessionContext sc, java.lang.String taskId, java.lang.String userId, java.util.ArrayList attachments)
           
 java.util.ArrayList createAttachment(SessionContext sc, java.lang.String taskId, java.lang.String userId, java.util.ArrayList attachments, boolean sendMail)
          Creates an attachment
 java.util.ArrayList createAttachment(SessionContext sc, java.lang.String taskId, java.lang.String userId, java.lang.String name, java.lang.String description, byte[] data)
           
 void deleteAttachment(SessionContext sc, java.lang.String attachmentId)
          Deletes an attachment
 byte[] getAttachment(SessionContext sc, java.lang.String taskId, java.lang.String fileName)
          Gets content of attached file
 void updateAttachment(SessionContext sc, java.lang.String attachmentId, java.lang.String name, java.lang.String description)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

pv

protected static ParameterValidator pv

c

protected java.lang.Class c
Constructor Detail

SecuredAttachmentAdapterManager

public SecuredAttachmentAdapterManager()
Method Detail

deleteAttachment

public void deleteAttachment(SessionContext sc,
                             java.lang.String attachmentId)
                      throws GranException
Deletes an attachment

Parameters:
sc - Session context
attachmentId - Attachment's id
Throws:
GranException

createAttachment

public java.util.ArrayList createAttachment(SessionContext sc,
                                            java.lang.String taskId,
                                            java.lang.String userId,
                                            java.lang.String name,
                                            java.lang.String description,
                                            byte[] data)
                                     throws GranException
Throws:
GranException

createAttachment

public java.util.ArrayList createAttachment(SessionContext sc,
                                            java.lang.String taskId,
                                            java.lang.String userId,
                                            java.util.ArrayList attachments,
                                            boolean sendMail)
                                     throws GranException
Creates an attachment

Parameters:
sc - Session context
taskId - Id of a task the attachment belongs to
Returns:
Id of a new attachment
Throws:
GranException

createAttachment

public java.util.ArrayList createAttachment(SessionContext sc,
                                            java.lang.String taskId,
                                            java.lang.String userId,
                                            java.util.ArrayList attachments)
                                     throws GranException
Throws:
GranException

updateAttachment

public void updateAttachment(SessionContext sc,
                             java.lang.String attachmentId,
                             java.lang.String name,
                             java.lang.String description)
                      throws GranException
Throws:
GranException

getAttachment

public byte[] getAttachment(SessionContext sc,
                            java.lang.String taskId,
                            java.lang.String fileName)
                     throws GranException
Gets content of attached file

Parameters:
sc - Session context
taskId - Id of a task the attachment belongs to
fileName - Name of the file
Returns:
Content of attached file
Throws:
GranException


Copyright © 2002-2008 TrackStudio, Ltd. All Rights Reserved.