Java Doc for ScriptMailServer.java in  » Groupware » ivatagroupware » com » ivata » groupware » business » mail » server » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Groupware » ivatagroupware » com.ivata.groupware.business.mail.server 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ivata.groupware.business.mail.server.JavaMailServer
      com.ivata.groupware.business.mail.server.ScriptMailServer

ScriptMailServer
public class ScriptMailServer extends JavaMailServer implements MailServer(Code)

This implementation of the mail server uses scripts to perform each of the actions.

The scripts must have the same name as each of the methods and use the same parameters. The location of the scripts within the system is set using the system setting 'pathScriptMailServer'.

For each script, a return value of 0 is taken as success. Any other value results in a GroupwareException GroupwareException being thrown, with the contents of the standard error stream as its message.


since:
   2002-07-20
author:
   Colin MacLeod
author:
   colin.macleod@ivata.com
version:
   $Revision: 1.6 $


Field Summary
 AddressBookaddressBook
    
 String[]environmentVariables
    
 StringscriptPath
    

Constructor Summary
public  ScriptMailServer(ScriptExecutor scriptExecutor, String userNamePrefix, AddressBook addressBook, Settings settings)
    

Method Summary
public  voidaddUser(SecuritySession securitySession, String userName, String fileAs)
    

Add a new user to the system.

final public  CollectiongetList(SecuritySession securitySession, String name)
    

Gets the contents of mailing list with the name provided.

This method calls the script called getList.


Parameters:
  name - the name of the list to be retrieved.
final public  StringgetSystemUserName(SecuritySession securitySession, String userName)
    
public  ListgetUserAliases(SecuritySession securitySession, String userName)
    

Gets all of the email aliases for the user provided.

This method calls the script getUserAliases.


Parameters:
  userName - the user for whom to get the email aliases.
final public  StringgetUserForwarding(SecuritySession securitySession, String userName)
    

Get the email addresss this user's mail is forwarded to.

This method calls the script getUserForwarding.


Parameters:
  userName - the user for whom to activate/deactive emailforwarding.
final public  StringgetUserNameFromSystemUserName(SecuritySession securitySession, String systemUserName)
    
final public  StringgetVacationMessage(SecuritySession securitySession, String userName)
    

Gets the current vacation method for the user provided.

public  booleanisUser(SecuritySession securitySession, String userNameParam)
    
public  voidremoveList(SecuritySession securitySession, String name)
    
public  voidremoveUser(SecuritySession securitySession, String userName)
    

Remove a user from the email system.

final public  voidsetList(SecuritySession securitySession, String name, Collection users)
    
final public  voidsetPassword(SecuritySession securitySession, String userName, String password)
    

Set a user's password in the system.

final public  voidsetUserAliases(SecuritySession securitySession, String userName, Collection aliases)
    
final public  voidsetUserForwarding(SecuritySession securitySession, String userName, String address)
    

Set an email addresss to forward this user's mail to.

final public  voidsetVacationMessage(SecuritySession securitySession, String userName, String messageParam)
    

Sets the vacation method for the user provided.


Field Detail
addressBook
AddressBook addressBook(Code)



environmentVariables
String[] environmentVariables(Code)



scriptPath
String scriptPath(Code)

Stores the sole instance of this class.





Constructor Detail
ScriptMailServer
public ScriptMailServer(ScriptExecutor scriptExecutor, String userNamePrefix, AddressBook addressBook, Settings settings)(Code)

Create a script mail server.





Method Detail
addUser
public void addUser(SecuritySession securitySession, String userName, String fileAs) throws SystemException(Code)

Add a new user to the system.

This method calls the addUser script.


Parameters:
  userName - it's userName in System
Parameters:
  fileAs - it's file as of user
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



getList
final public Collection getList(SecuritySession securitySession, String name) throws SystemException(Code)

Gets the contents of mailing list with the name provided.

This method calls the script called getList.


Parameters:
  name - the name of the list to be retrieved. a Collection containingUserLocalinstances of each of the users in the list.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



getSystemUserName
final public String getSystemUserName(SecuritySession securitySession, String userName)(Code)

This method add prefix to username.


Parameters:
  userName - prefix_userName



getUserAliases
public List getUserAliases(SecuritySession securitySession, String userName) throws SystemException(Code)

Gets all of the email aliases for the user provided.

This method calls the script getUserAliases.


Parameters:
  userName - the user for whom to get the email aliases. a Collection containingString values for each of the aliases.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



getUserForwarding
final public String getUserForwarding(SecuritySession securitySession, String userName) throws SystemException(Code)

Get the email addresss this user's mail is forwarded to.

This method calls the script getUserForwarding.


Parameters:
  userName - the user for whom to activate/deactive emailforwarding. email address all email for this user is forwarded to, ornull if there is no forwarding for this user.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



getUserNameFromSystemUserName
final public String getUserNameFromSystemUserName(SecuritySession securitySession, String systemUserName)(Code)

This method is converting SystemUserName to userName, it's oposite method to getSystemUserName.


Parameters:
  systemUserName -



getVacationMessage
final public String getVacationMessage(SecuritySession securitySession, String userName) throws SystemException(Code)

Gets the current vacation method for the user provided.

This method calls the script getVacationMessage.


Parameters:
  userName - the user for whom to set the vacation message. the current vacation message for this user, ornull ifthe user does not have a vacation message.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



isUser
public boolean isUser(SecuritySession securitySession, String userNameParam) throws SystemException(Code)
Refer to .
Parameters:
  userNameParam -
See Also:   com.ivata.groupware.admin.security.server.SecurityServer.isUser(java.lang.String)



removeList
public void removeList(SecuritySession securitySession, String name) throws SystemException(Code)

Removes an existing mailing list from the system.

The removeList script is called with name as its only parameter.


Parameters:
  name - the name of the list to remove.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



removeUser
public void removeUser(SecuritySession securitySession, String userName) throws SystemException(Code)

Remove a user from the email system. Note: this user is not removed from the address book, only the email server. Comments by this user will still appear in the system, though the user will no longer have an email account.

This is good for employees who have left the company. We still want to see their contributions, but they no longer have access to the system themselves.

This method calls the removeUser script.


Parameters:
  userName - the user to remove from the email system.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



setList
final public void setList(SecuritySession securitySession, String name, Collection users) throws SystemException(Code)

Adds or amends a mailing list with the name and users provided.

This method calls the setList script with the name as the first parameter and the user names of each of the users as following parameters.


Parameters:
  name - the name of the list to be added.
Parameters:
  users - Collection containingUserLocal instances of each of the users in the list.Note that if you are changing an existing list, this array shouldcontain all of the users, not just the new ones.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



setPassword
final public void setPassword(SecuritySession securitySession, String userName, String password) throws SystemException(Code)

Set a user's password in the system. This method calls the setPassword script with userName and password as parameters.


Parameters:
  userName - the user for whom to set the password.
Parameters:
  password - new value of the password.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



setUserAliases
final public void setUserAliases(SecuritySession securitySession, String userName, Collection aliases) throws SystemException(Code)

Gets all of the email aliases for the user provided.

This method calls the script setUserAliases.


Parameters:
  userName - the user for whom to get the email aliases.
Parameters:
  aliases - a Collection containingString values for each of the aliases.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



setUserForwarding
final public void setUserForwarding(SecuritySession securitySession, String userName, String address) throws SystemException(Code)

Set an email addresss to forward this user's mail to. If address is set to null then any previous email forwarding is removed.
Parameters:
  userName - the user for whom to activate/deactive emailforwarding.
Parameters:
  address - email address to forward all email for this user to.If thisaddress is set to null then any previous forwarding isremoved.
throws:
  GroupwareException - containing the content of the standarderrorstream, if the script returns non-zero.




setVacationMessage
final public void setVacationMessage(SecuritySession securitySession, String userName, String messageParam) throws SystemException(Code)

Sets the vacation method for the user provided. This message will be sent to all mails received at this address until it has been cleared, by calling this method again with a null value for the message parameter.

This method calls the setVacationMessage script with user name and message as parameters. If the message parameter is null, then the script is called with just the user name parameter.


Parameters:
  userName - the user for whom to set the vacation message.
Parameters:
  messageParam - the new vacation message for this user. Set tonull to remove any existing vacation message.
throws:
  GroupwareException - containing the content of the standarderror stream, if the script returns non-zero.



Methods inherited from com.ivata.groupware.business.mail.server.JavaMailServer
public boolean checkPassword(SecuritySession securitySession, String userName, String password) throws SystemException(Code)(Java Doc)
public Store connectStore(MailSession mailSession) throws SystemException(Code)(Java Doc)
public Folder getFolder(SecuritySession securitySession, Store store, String name) throws SystemException(Code)(Java Doc)
public boolean hasNewMessages(SecuritySession securitySession, String userName, String folderName) throws SystemException(Code)(Java Doc)
public SecuritySession login(UserDO user, String password) throws SystemException(Code)(Java Doc)
public SecuritySession loginGuest() throws SystemException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.