com.ibm.pim.userdefinedlog
Interface ItemUserDefinedLog

All Superinterfaces:
UserDefinedLog

public interface ItemUserDefinedLog
extends UserDefinedLog

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

Since:
6.0.0

Field Summary
 
Fields inherited from interface com.ibm.pim.userdefinedlog.UserDefinedLog
copyright
 
Method Summary
 UserDefinedLogEntry createLogEntry(Item item, Category category, java.lang.String entry)
          Creates a UserDefinedLogEntry for a given item which belongs to the specific category passed as argument.
 UserDefinedLogEntry createLogEntry(Item item, java.lang.String entry)
          Creates a UserDefinedLogEntry for a given item.The UserDefinedLogEntry object must be persisted by calling UserDefinedLog.save() on the containing UserDefinedLog
 void deleteEntries(Item item)
          Deletes the UserDefinedLogEntries corresponding to the item passed as the argument.
 void deleteEntries(Item item, Category category)
          Deletes the UserDefinedLogEntries corresponding to the item which belongs to the specific category passed as argument.
 Catalog getCatalog()
          Fetches the catalog with which this UserDefinedLog is associated.
 PIMCollection<UserDefinedLogEntry> getLogEntries(Item item)
          Retrieves all UserDefinedLogEntry objects associated with a specific item
 PIMCollection<UserDefinedLogEntry> getLogEntries(Item item, Category category)
          Retrieves all UserDefinedLogEntry objects associated with the item which belongs to the specific category passed as argument.
 
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(Item item,
                                   java.lang.String entry)
Creates a UserDefinedLogEntry for a given item.The UserDefinedLogEntry object must be persisted by calling UserDefinedLog.save() on the containing UserDefinedLog

Parameters:
item - The item 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 item is null or entry is null or if the item is not belong to the Catalog to which this user defined log is associated
java.lang.IllegalStateException - If the UserDefinedLog or the item has not been persisted

createLogEntry

UserDefinedLogEntry createLogEntry(Item item,
                                   Category category,
                                   java.lang.String entry)
Creates a UserDefinedLogEntry for a given item which belongs to the specific category passed as argument. The UserDefinedLogEntry object must be persisted by calling UserDefinedLog.save() on the containing UserDefinedLog

Parameters:
item - The item for which a new UserDefinedLogEntry has to be created.
category - The category to which this item belongs to.
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 item is null or category is null or entry is null or if the item is not belong to the Catalog to which this user defined log is associated or if the item is not belong to the category passed as argument
java.lang.IllegalStateException - If the UserDefinedLog or the item or the category has not been persisted

getLogEntries

PIMCollection<UserDefinedLogEntry> getLogEntries(Item item)
Retrieves all UserDefinedLogEntry objects associated with a specific item

Parameters:
item - The Item for which to retrieve UserDefinedLogEntry objects
Returns:
A PIMCollection of UserDefinedLogEntry objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If item is null or if the item is not belong to the Catalog to which this user defined log is associated
java.lang.IllegalStateException - If the UserDefinedLog or the item has not been persisted

getLogEntries

PIMCollection<UserDefinedLogEntry> getLogEntries(Item item,
                                                 Category category)
Retrieves all UserDefinedLogEntry objects associated with the item which belongs to the specific category passed as argument.

Parameters:
item - The Item for which to retrieve UserDefinedLogEntry objects
category - The category to which the item belongs to
Returns:
A PIMCollection of UserDefinedLogEntry objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If item is null or if the category is null or if the item is not belong to the Catalog to which this user defined log is associated or if the item is not belong to the category passed as argument
java.lang.IllegalStateException - If the UserDefinedLog or the item or the category has not been persisted

deleteEntries

void deleteEntries(Item item)
Deletes the UserDefinedLogEntries corresponding to the item passed as the argument. If there are no entries corresponding the item, 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:
item - The UserDefinedLogEntries corresponding to this item will be deleted.
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If item is null or if the item is not belong to the Catalog to which this user defined log is associated
java.lang.IllegalStateException - If the UserDefinedLog or the item has not been persisted

deleteEntries

void deleteEntries(Item item,
                   Category category)
Deletes the UserDefinedLogEntries corresponding to the item which belongs to the specific category passed as argument. If there are no entries corresponding the item, 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:
item - The UserDefinedLogEntries corresponding to this item will be deleted.
category - The category to which this item belongs to
Throws:
PIMInternalException - If an internal error occurs.
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If item is null or if the category is null or if the item is not belong to the Catalog to which this user defined log is associated or if the item is not belong to the category passed as argument
java.lang.IllegalStateException - If the UserDefinedLog or the item or the category has not been persisted

getCatalog

Catalog getCatalog()
Fetches the catalog with which this UserDefinedLog is associated.

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