com.ibm.pim.userdefinedlog
Interface CategoryUserDefinedLog

All Superinterfaces:
UserDefinedLog

public interface CategoryUserDefinedLog
extends UserDefinedLog

Interface representing a UserDefinedLog object that holds log entries for categories.

Since:
6.0.0

Field Summary
 
Fields inherited from interface com.ibm.pim.userdefinedlog.UserDefinedLog
copyright
 
Method Summary
 UserDefinedLogEntry createLogEntry(Category category, java.lang.String entry)
          Creates a UserDefinedLogEntry for a given category.
 void deleteEntries(Category category)
          Deletes the UserDefinedLogEntries corresponding to this category.
 Hierarchy getHierarchy()
          Fetches the hierarchy with which this UserDefinedLog is associated.
 PIMCollection<UserDefinedLogEntry> getLogEntries(Category category)
          Fetches the UserDefinedLogEntry objects corresponding to the category passed in.
 
Methods inherited from interface com.ibm.pim.userdefinedlog.UserDefinedLog
accept, delete, deleteAllEntries, getDescription, getLogEntries, getName, isRunningLog, save, setDescription, setName, setRunningLog
 

Method Detail

createLogEntry

UserDefinedLogEntry createLogEntry(Category category,
                                   java.lang.String entry)
Creates a UserDefinedLogEntry for a given category. The UserDefinedLogEntry object must be persisted by calling UserDefinedLog.save() on the containing UserDefinedLog

Parameters:
category - The category for which a new UserDefinedLogEntry has to be created.
entry - The name of the user defined log entry.
Returns:
A UserDefinedLogEntry object.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If category is null or entry is null or if the category is not belong to the Hierarchy to which this user defined log is associated
java.lang.IllegalStateException - If the UserDefinedLog or the category has not been persisted

getLogEntries

PIMCollection<UserDefinedLogEntry> getLogEntries(Category category)
Fetches the UserDefinedLogEntry objects corresponding to the category passed in. If no log entries are present for this category, an empty PIMCollection will be returned.

Parameters:
category - The UserDefinedLogEntries corresponding to this category will be fetched.
Returns:
A PIMCollection of UserDefinedLogEntry objects.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If category is null or if the category is not belong to the Hierarchy to which this user defined log is associated
java.lang.IllegalStateException - If the UserDefinedLog or the category has not been persisted

deleteEntries

void deleteEntries(Category category)
Deletes the UserDefinedLogEntries corresponding to this category. If there are no entries corresponding to the category, the method does not delete any entries. This operation directly updates the database,hence the user is not required to perform a save operation.

Parameters:
category - The UserDefinedLogEntries corresponding to this category will be deleted.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If category is null or if the category is not belong to the Hierarchy to which this user defined log is associated
java.lang.IllegalStateException - If the UserDefinedLog or the category has not been persisted

getHierarchy

Hierarchy getHierarchy()
Fetches the hierarchy with which this UserDefinedLog is associated.

Returns:
The hierarchy with which this UserDefinedLog is associated.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_LIST