UM Manager Java API  6.16.1
umm.api.UMMAPI Class Reference

Public Member Functions

 UMMAPI (String filename) throws Exception
 
 UMMAPI (Properties props) throws Exception
 
void close () throws SQLException
 
boolean login (String userName, String password) throws Exception
 
boolean logOff ()
 
boolean setAdmin (int userType)
 
void setExceptionListener (ExceptionListener listener)
 
boolean deleteApplication (int applicationId) throws Exception
 
boolean deleteApplication (NameValue applicationNV) throws Exception
 
boolean deleteTemplate (int templateId) throws Exception
 
boolean deleteTemplate (NameValue templateNV) throws Exception
 
boolean deleteUser (int userId) throws Exception
 
boolean deleteUser (NameValue userNV) throws Exception
 
User getUser (int userId) throws Exception
 
User getUser (NameValue userNV) throws Exception
 
boolean setUserPassword (int userID, String password) throws Exception
 
boolean setUserPassword (NameValue nv, String password) throws Exception
 
NameValue saveUser (String name, User user) throws Exception
 
boolean saveUser (NameValue userNV, User user) throws Exception
 
boolean setTemplates (String name, ArrayList< NameValue > templates) throws Exception
 
boolean setTemplates (int applicationID, ArrayList< NameValue > templates) throws Exception
 
boolean setTemplates (int applicationID, ArrayList< NameValue > templates, int type) throws Exception
 
boolean setTemplates (NameValue application, ArrayList< NameValue > templates) throws Exception
 
boolean setTemplates (NameValue application, ArrayList< NameValue > templates, int type) throws Exception
 
NameValue saveTemplate (String name, String xml) throws Exception
 
boolean saveTemplate (NameValue templateNV, String xml) throws Exception
 
NameValue saveApplication (String name, String xml) throws Exception
 
boolean saveApplication (NameValue applicationNV, String xml) throws Exception
 
boolean saveApplication (NameValue applicationNV, String xml, int type) throws Exception
 
ArrayList< NameValuegetTemplateNames () throws Exception
 
ArrayList< NameValuegetApplicationNames () throws Exception
 
ArrayList< NameValuegetApplicationNames (int type) throws Exception
 
ArrayList< NameValuegetUserApplicationNames (int userId) throws Exception
 
ArrayList< NameValuegetUserApplicationNames (NameValue userNV) throws Exception
 
boolean setApplications (int userId, ArrayList< NameValue > applicationList) throws Exception
 
boolean setApplications (NameValue userNV, ArrayList< NameValue > applicationList) throws Exception
 
ArrayList< NameValuegetUserNames () throws Exception
 
String getConfig (String applicationName) throws Exception
 
String getConfig (String applicationName, int type) throws Exception
 
String getConfig (NameValue applicationNV, int type) throws Exception
 
String getApplication (String name, int type) throws Exception
 
String getApplication (int applicationId) throws Exception
 
String getApplication (NameValue applicationNV) throws Exception
 
String getTemplate (int templateId) throws Exception
 
String getTemplate (NameValue templateNV) throws Exception
 
ArrayList getAuditLog (long begin, long end) throws Exception
 
User getUser ()
 
String getError ()
 

Static Public Attributes

static String UMM_XML_START = "<um-configuration version=\"1.0\">"
 
static String UMM_XML_STOP = "</um-configuration>"
 
static final int APPLICATION = 0
 
static final int CONNECTION_FACTORY = 1
 
static final int DESTINATION = 2
 
static final int TEMPLATE = 3
 
static final int USER = 4
 
static final int AUDIT = 5
 

Detailed Description

Author
Stan

Member Function Documentation

void umm.api.UMMAPI.close ( ) throws SQLException

close the UMM system.

Exceptions
SQLException
boolean umm.api.UMMAPI.deleteApplication ( int  applicationId) throws Exception

Delete an Application.

Parameters
applicationIdThe ID of the Application.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
boolean umm.api.UMMAPI.deleteApplication ( NameValue  applicationNV) throws Exception

Delete an Application.

Parameters
applicationNVThe NameValue that contains the id of the Application.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
boolean umm.api.UMMAPI.deleteTemplate ( int  templateId) throws Exception

Delete a Template.

Parameters
templateIdThe id of an existing Template.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
boolean umm.api.UMMAPI.deleteTemplate ( NameValue  templateNV) throws Exception

Delete a Template.

Parameters
templateNVThe NameValue object that contains the id of an existing Template.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
boolean umm.api.UMMAPI.deleteUser ( int  userId) throws Exception

Delete an existing User.

Parameters
userId
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
boolean umm.api.UMMAPI.deleteUser ( NameValue  userNV) throws Exception

Delete an existing User.

Parameters
userNVThe NameValue object that contains the id of an existing User.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.getUserNames().

String umm.api.UMMAPI.getApplication ( String  name,
int  type 
) throws Exception

Get the XML for an Application.

Parameters
nameName.
typeThe application type.
Returns
The xml for an application. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

Referenced by umm.api.UMMAPI.getApplication().

String umm.api.UMMAPI.getApplication ( int  applicationId) throws Exception

Get the XML for an Application.

Parameters
applicationIdThe ID for an application.
Returns
The xml for an application. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.getApplication().

String umm.api.UMMAPI.getApplication ( NameValue  applicationNV) throws Exception

Get the XML for an Application.

Parameters
applicationNVThis must contain the id of the application.
Returns
The xml for an application. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
ArrayList<NameValue> umm.api.UMMAPI.getApplicationNames ( ) throws Exception

Returns a list of application NameValue objects that contains the name and id of each application. Returns null on failure. The method "getError" will return the reason for the failure.

Returns
Exceptions
Exception

Referenced by umm.api.UMMAPI.saveApplication(), umm.api.UMMAPI.setApplications(), and umm.api.UMMAPI.setTemplates().

ArrayList<NameValue> umm.api.UMMAPI.getApplicationNames ( int  type) throws Exception

Returns a list of application NameValue objects that contains the name and id of each application. Returns null on failure. The method "getError" will return the reason for the failure.

Parameters
typeThe application type that is associated with the application.
Returns
Exceptions
Exception
ArrayList umm.api.UMMAPI.getAuditLog ( long  begin,
long  end 
) throws Exception

Get the Audit Log. Times are in milliseconds.

Parameters
beginThe start time in milliseconds since 1970.
endThe end time in milliseconds since 1970.
Returns
A list of AuditLogData objects. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.getUser().

String umm.api.UMMAPI.getConfig ( String  applicationName) throws Exception

Get the XML for an Application.

Parameters
applicationNameThis is the name of the application.
Returns
Returns the xml for an application. This will include the xml for the templates that have been assigned to the application. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

Referenced by umm.api.UMMAPI.getConfig().

String umm.api.UMMAPI.getConfig ( String  applicationName,
int  type 
) throws Exception

Get the XML for an Application.

Parameters
applicationNameThis is the name of the application.
typeThe application type.
Returns
Returns the xml for an application. This will include the xml for the templates that have been assigned to the application. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.getConfig().

String umm.api.UMMAPI.getConfig ( NameValue  applicationNV,
int  type 
) throws Exception

Get the XML for an Application.

Parameters
applicationNVThis must contain the the name of the application.
typeThe application type.
Returns
Returns the xml for an application. This will include the xml for the templates that have been assigned to the application. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.User.getUserType().

String umm.api.UMMAPI.getError ( )

Return the last error.

Returns
A string that represents the last error.

References umm.api.NameValue.getName().

String umm.api.UMMAPI.getTemplate ( int  templateId) throws Exception

Get the XML for a Template.

Parameters
templateIdThe ID for a template.
Returns
The xml for an template. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
String umm.api.UMMAPI.getTemplate ( NameValue  templateNV) throws Exception

Get the XML for a Template.

Parameters
templateNVThis must contain the id of the template.
Returns
The xml for an template. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
ArrayList<NameValue> umm.api.UMMAPI.getTemplateNames ( ) throws Exception

Get all Template names.

Returns
A list of template NameValue objects that contain the name and id of each template. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

Referenced by umm.api.UMMAPI.saveTemplate(), and umm.api.UMMAPI.setTemplates().

User umm.api.UMMAPI.getUser ( int  userId) throws Exception

Get User information for an existing User.

Parameters
userIdThe id of an existing User.
Returns
A User object on success and null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.getUser().

Referenced by umm.api.UMMAPI.getAuditLog(), and umm.api.UMMAPI.getUser().

User umm.api.UMMAPI.getUser ( NameValue  userNV) throws Exception

Get User information for an existing User.

Parameters
userNVThe NameValue object that contains the id of an existing User
Returns
A User object on success and null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
ArrayList<NameValue> umm.api.UMMAPI.getUserApplicationNames ( NameValue  userNV) throws Exception

Returns the Applications that are assigned to a user.

Parameters
userNV- This must contain the user ID for an existing user.
Returns
A list of application NameValue objects that contain the name and id of each application for a given user. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
ArrayList<NameValue> umm.api.UMMAPI.getUserNames ( ) throws Exception

Get all the User names.

Returns
A list of NameValue objects of all Users. Returns null on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

Referenced by umm.api.UMMAPI.deleteUser(), and umm.api.UMMAPI.saveUser().

boolean umm.api.UMMAPI.login ( String  userName,
String  password 
) throws Exception

Login into UMM system.

Parameters
userNameThe login name of the User. This needs to be an "admin" user.
passwordThe password of the User.
Returns
true on success and false on failure.
Exceptions
Exception
boolean umm.api.UMMAPI.logOff ( )

Log off of the UMM system.

Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
NameValue umm.api.UMMAPI.saveApplication ( String  name,
String  xml 
) throws Exception

Save the XML for a Application.

Parameters
nameThe name of the application.
xmlThe xml that will associated with the application.
Returns
NameValue on success and null on failure. The method "getError" will return the reason for the failure.

References umm.api.UMMAPI.getApplicationNames(), and umm.api.NameValue.getName().

Referenced by umm.api.UMMAPI.saveApplication().

boolean umm.api.UMMAPI.saveApplication ( NameValue  applicationNV,
String  xml 
) throws Exception

Save the XML for a Application.

Parameters
applicationNVThis must contain the application ID for an existing user or -1 for a new application.
xmlThe xml that will associated with the application.
Returns
true on success and false on failure. The applicationId will be updated on the creation of a new application. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.saveApplication().

boolean umm.api.UMMAPI.saveApplication ( NameValue  applicationNV,
String  xml,
int  type 
) throws Exception

Save the XML for a Application.

Parameters
applicationNVThis must contain the application ID for an existing user or -1 for a new application.
xmlThe xml that will associated with the application.
typeThe applicatin type that will associated with the application.
Returns
true on success and false on failure. The applicationId will be updated on the creation of a new application. The method "getError" will return the reason for the failure.
Exceptions
Exception
NameValue umm.api.UMMAPI.saveTemplate ( String  name,
String  xml 
) throws Exception

Save the XML for a Template.

Parameters
nameThe name of the template.
xmlThe xml that will associated with the template.
Returns
NameValue on success and null on failure. The method "getError" will return the reason for the failure.

References umm.api.NameValue.getName(), and umm.api.UMMAPI.getTemplateNames().

boolean umm.api.UMMAPI.saveTemplate ( NameValue  templateNV,
String  xml 
) throws Exception

Save the XML for a Template.

Parameters
templateNVThis must contain the template ID for an existing template or -1 for a new template.
xmlThe xml that will associated with the template.
Returns
true on success and false on failure. The templateId will be updated on creation of a new template. The method "getError" will return the reason for the failure.
Exceptions
Exception
NameValue umm.api.UMMAPI.saveUser ( String  name,
User  user 
) throws Exception

Save the User. This method is used to save new or existing users.

Parameters
nameThe name of the user.
userThis User object contains all of the user information.
Returns
true on success and false on failure. The userId will be updated on creation of a new user. The method "getError" will return the reason for the failure.

References umm.api.UMMAPI.getUserNames().

boolean umm.api.UMMAPI.saveUser ( NameValue  userNV,
User  user 
) throws Exception

Save the User. This method is used to save new or existing users.

Parameters
userNVThis must contain the user ID for an existing user or -1 for a new user.
userThis User object contains all of the user information.
Returns
true on success and false on failure. The userId will be updated on creation of a new user. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.NameValue.setValue().

boolean umm.api.UMMAPI.setAdmin ( int  userType)

Set the admin privilege. The privilege can only go from ADMIN to Normal. The getConfig method returns different results for an "Admin" and "Normal" users.

Parameters
userTypeSet to User.ADMIN or User.NORMAL
Returns
true on success and false on failure.

References umm.api.User.getUserType(), and umm.api.User.setUserType().

boolean umm.api.UMMAPI.setApplications ( int  userId,
ArrayList< NameValue applicationList 
) throws Exception

Set the Applications for a User.

Parameters
userIdThe ID of the user to assign applications to.
applicationListThe list of applications that are to be assign to the User.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception
boolean umm.api.UMMAPI.setApplications ( NameValue  userNV,
ArrayList< NameValue applicationList 
) throws Exception

Set the Applications for a User.

Parameters
userNVThis must contain the user ID for an existing user.
applicationListThe list of applications that are to be assign to the User.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.getApplicationNames().

void umm.api.UMMAPI.setExceptionListener ( ExceptionListener  listener)

Set an Exception Listener. The exceptionThrown method will be called when an exception happens.

Parameters
listener
boolean umm.api.UMMAPI.setTemplates ( String  name,
ArrayList< NameValue templates 
) throws Exception

Set the Templates for an Application.

Parameters
nameThe application to assign the templates to.
templatesA list of templates to assign to the application.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.getApplicationNames(), and umm.api.NameValue.getName().

Referenced by umm.api.UMMAPI.setTemplates().

boolean umm.api.UMMAPI.setTemplates ( int  applicationID,
ArrayList< NameValue templates 
) throws Exception

Set the Templates for an Application.

Parameters
applicationIDThe application to assign the templates to.
templatesA list of templates to assign to the application.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.setTemplates().

boolean umm.api.UMMAPI.setTemplates ( int  applicationID,
ArrayList< NameValue templates,
int  type 
) throws Exception

Set the Templates for an Application.

Parameters
applicationIDThe application to assign the templates to.
templatesA list of templates to assign to the application.
typeThe application type.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

References umm.api.UMMAPI.setTemplates().

boolean umm.api.UMMAPI.setTemplates ( NameValue  application,
ArrayList< NameValue templates 
) throws Exception

Save the XML for a Template.

Parameters
applicationThe name of the template.
applicationThe application ID.
templatesList of templates.
Returns
true on success.
Exceptions
Exception

References umm.api.UMMAPI.setTemplates().

boolean umm.api.UMMAPI.setTemplates ( NameValue  application,
ArrayList< NameValue templates,
int  type 
) throws Exception

Save the XML for a Template.

Parameters
applicationThe name of the template.
templatesList of templates.
typeThe Application type.
Returns
true on success.
Exceptions
Exception

References umm.api.UMMAPI.getApplicationNames(), and umm.api.UMMAPI.getTemplateNames().

boolean umm.api.UMMAPI.setUserPassword ( int  userID,
String  password 
) throws Exception

Set the password for a user.

Parameters
userIDThe id of an existing user.
passwordThe new password.
Returns
true on success and false on failure. The method "getError" will return the reason for the failure.
Exceptions
Exception

Referenced by umm.api.UMMAPI.setUserPassword().

boolean umm.api.UMMAPI.setUserPassword ( NameValue  nv,
String  password 
) throws Exception

Set the password for a user. The integer value in the NameValue object will used to set the password.

Parameters
nv
password
Returns
Exceptions
Exception

References umm.api.UMMAPI.setUserPassword().


The documentation for this class was generated from the following file: