com.trackstudio.securedkernel
Class SecuredEmailTypeAdapterManager

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

public class SecuredEmailTypeAdapterManager
extends java.lang.Object

This manager is used for creating and deleting of email templates


Constructor Summary
SecuredEmailTypeAdapterManager()
           
 
Method Summary
 java.lang.String cloneEmailType(SessionContext sc, java.lang.String toUserId, java.lang.String emailTypeId)
          Clone email template
 java.lang.String createEmailType(SessionContext sc, java.lang.String ownerId, java.lang.String name)
          Create a new email template
 void deleteEmailType(SessionContext sc, java.lang.String emailTypeId)
          Delete email template
 java.util.ArrayList getAvailableEmailTypeList(SessionContext sc, java.lang.String userId)
          Get available email templates for the user
 java.util.ArrayList getContentTypeList(SessionContext sc)
          Get available content types
 java.util.ArrayList getFromTypeList(SessionContext sc)
          Get available from types
 java.lang.String getTemplate(SessionContext sc, java.lang.String emailTypeId)
          Get email template text
 void setTemplate(SessionContext sc, java.lang.String toUserId, java.lang.String emailTypeId, java.lang.String type, java.lang.String subject, java.lang.String from, java.lang.String reply, java.lang.String cc, java.lang.String text)
          Set email template properties
 void updateEmailType(SessionContext sc, java.lang.String emailTypeId, java.lang.String name)
          Update email template
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecuredEmailTypeAdapterManager

public SecuredEmailTypeAdapterManager()
Method Detail

createEmailType

public java.lang.String createEmailType(SessionContext sc,
                                        java.lang.String ownerId,
                                        java.lang.String name)
                                 throws GranException
Create a new email template

Parameters:
sc - session context
ownerId - owned user's id
name - name of template
Returns:
template's id
Throws:
GranException

cloneEmailType

public java.lang.String cloneEmailType(SessionContext sc,
                                       java.lang.String toUserId,
                                       java.lang.String emailTypeId)
                                throws GranException
Clone email template

Parameters:
sc - session context
toUserId - new owner's id
emailTypeId - cloned template's id
Returns:
new template's id
Throws:
GranException

updateEmailType

public void updateEmailType(SessionContext sc,
                            java.lang.String emailTypeId,
                            java.lang.String name)
                     throws GranException
Update email template

Parameters:
sc - session context
emailTypeId - template's id
name - new name
Throws:
GranException

deleteEmailType

public void deleteEmailType(SessionContext sc,
                            java.lang.String emailTypeId)
                     throws GranException
Delete email template

Parameters:
sc - session context
emailTypeId - template's id
Throws:
GranException

getAvailableEmailTypeList

public java.util.ArrayList getAvailableEmailTypeList(SessionContext sc,
                                                     java.lang.String userId)
                                              throws GranException
Get available email templates for the user

Parameters:
sc - session context
userId - user's id
Returns:
array of template's ids
Throws:
GranException

getFromTypeList

public java.util.ArrayList getFromTypeList(SessionContext sc)
                                    throws GranException
Get available from types

Parameters:
sc - session context
Returns:
array of from type ids
Throws:
GranException
See Also:
FromType

getContentTypeList

public java.util.ArrayList getContentTypeList(SessionContext sc)
                                       throws GranException
Get available content types

Parameters:
sc - session context
Returns:
array of content type ids
Throws:
GranException
See Also:
ContentType

getTemplate

public java.lang.String getTemplate(SessionContext sc,
                                    java.lang.String emailTypeId)
                             throws GranException
Get email template text

Parameters:
sc - session context
emailTypeId - template's id
Returns:
template's text
Throws:
GranException

setTemplate

public void setTemplate(SessionContext sc,
                        java.lang.String toUserId,
                        java.lang.String emailTypeId,
                        java.lang.String type,
                        java.lang.String subject,
                        java.lang.String from,
                        java.lang.String reply,
                        java.lang.String cc,
                        java.lang.String text)
                 throws GranException
Set email template properties

Parameters:
sc - session context
toUserId - owner's id
emailTypeId - template's id
type - email type's id (ContentType)
subject - template of subject
from - from user
reply - reply users
cc - cc field
text - template text
Throws:
GranException
See Also:
EmailType, ContentType


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