atg.repository
Interface MutableRepository

All Superinterfaces:
Repository, RepositoryViewContainer
All Known Subinterfaces:
SecuredMutableRepository
All Known Implementing Classes:
GenericSecuredMutableContentRepository, GenericSecuredMutableRepository, SimpleRepository, XMLRepositoryService

public interface MutableRepository
extends Repository


Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 RepositoryItem addItem(MutableRepositoryItem pItem)
          Adds the supplied item populated to the repository.
 RepositoryItem addItem(RepositoryItem pItem, java.lang.String pDescriptorName)
          Deprecated.  
 MutableRepositoryItem createItem(java.lang.String pDescriptorName)
          Returns a new item using an auto-generated unique id
 MutableRepositoryItem createItem(java.lang.String pId, java.lang.String pDescriptorName)
          Returns a new item populated with the supplied id.
 MutableRepositoryItem getItemForUpdate(java.lang.String pId)
          Deprecated. this method is replaced by getItemForUpdate(String,String). If the second argument, i.e. the descriptor name, is unknown then use getItemForUpdate(String,Repository.getDefaultViewName()).
 MutableRepositoryItem getItemForUpdate(java.lang.String pId, java.lang.String pDescriptorName)
          If one wants write access to an item it should be retrieved through this method.
 MutableRepositoryItem[] getItemsForUpdate(java.lang.String[] pIds)
          If one wants write access to a set of items they should be retrieved through this method
 MutableRepositoryItem[] getItemsForUpdate(java.lang.String[] pIds, java.lang.String pDescriptorName)
          If one wants write access to a set of items they should be retrieved through this method.
 void removeItem(java.lang.String pId)
          Deprecated. this method is replaced by removeItem(String,String). If the second argument, i.e. the descriptor name is unknown, then use removeItem(String,Repository.getDefaultViewName()).
 void removeItem(java.lang.String pId, java.lang.String pDescriptorName)
          Removes an item from the Repository permanently.
 void updateItem(MutableRepositoryItem pItem)
          Updates the item's values into the Repository
 
Methods inherited from interface atg.repository.Repository
getDefaultViewName, getItem, getItem, getItemDescriptor, getItemDescriptor, getItemDescriptorNames, getItems, getItems, getRepositoryName, getView, getView, getViewNames
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

getItemForUpdate

MutableRepositoryItem getItemForUpdate(java.lang.String pId)
                                       throws RepositoryException
Deprecated. this method is replaced by getItemForUpdate(String,String). If the second argument, i.e. the descriptor name, is unknown then use getItemForUpdate(String,Repository.getDefaultViewName()).

If one wants write access to an item it should be retrieved through this method. This item must have already been added to the repository using addItem. This version updates an item in the default item descriptor.

Parameters:
pId - the id of the item to update.
Throws:
RepositoryException - if the item could not be retreived for update

getItemForUpdate

MutableRepositoryItem getItemForUpdate(java.lang.String pId,
                                       java.lang.String pDescriptorName)
                                       throws RepositoryException
If one wants write access to an item it should be retrieved through this method. This item must have already been added to the repository using addItem.

Parameters:
pId - the id of the item to update.
pDescriptorName - the name of the type of item to update.
Throws:
RepositoryException - if the item could not be retreived for update

getItemsForUpdate

MutableRepositoryItem[] getItemsForUpdate(java.lang.String[] pIds)
                                          throws RepositoryException
If one wants write access to a set of items they should be retrieved through this method

Throws:
RepositoryException - if the item could not be retreived for update

getItemsForUpdate

MutableRepositoryItem[] getItemsForUpdate(java.lang.String[] pIds,
                                          java.lang.String pDescriptorName)
                                          throws RepositoryException
If one wants write access to a set of items they should be retrieved through this method. This version updates items in the default item descriptor.

Parameters:
pIds - the list of ids of items to retrieve for update
pDescriptorName - the name of the item descriptor that contains these items.
Throws:
RepositoryException - if the item could not be retreived for update

createItem

MutableRepositoryItem createItem(java.lang.String pDescriptorName)
                                 throws RepositoryException
Returns a new item using an auto-generated unique id

Parameters:
pDescriptorName - the name of the RepositoryItemDescriptor which should be used as the "template" to create the item
Throws:
RepositoryException - if the item could not be created

createItem

MutableRepositoryItem createItem(java.lang.String pId,
                                 java.lang.String pDescriptorName)
                                 throws RepositoryException
Returns a new item populated with the supplied id.

The new item is not added to the repository; addItem must be called in order to change the repository.

Parameters:
pId - the id to use in an attempt to create the RepositoryItem
pDescriptorName - the name of the RepositoryItemDescriptor which should be used as the "template" to create the item
Throws:
RepositoryException - if the item could not be created
DuplicateIdException - if the id is already in use

addItem

RepositoryItem addItem(RepositoryItem pItem,
                       java.lang.String pDescriptorName)
                       throws RepositoryException
Deprecated. 

Adds the supplied item populated to the repository.

Parameters:
pItem - the item to add
pDescriptorName - the name of the RepositoryItemDescriptor which should be used as the "template" to add the item
Returns:
An instance of RepositoryItem which describes the newly added item
Throws:
RepositoryException - if the item could not be added

addItem

RepositoryItem addItem(MutableRepositoryItem pItem)
                       throws RepositoryException
Adds the supplied item populated to the repository. Returns a new item (with potentially a different id) that represents a persistent item in the repository.

Parameters:
pItem - the item to add
Returns:
An instance of RepositoryItem which describes the newly added item
Throws:
RepositoryException - if the item could not be added

updateItem

void updateItem(MutableRepositoryItem pItem)
                throws RepositoryException
Updates the item's values into the Repository

Parameters:
pItem - the item to update
Throws:
RepositoryException - if the item could not be updated
ConcurrentUpdateException - if the item has been changed in another transaction since this transaction started using this item.

removeItem

void removeItem(java.lang.String pId)
                throws RepositoryException
Deprecated. this method is replaced by removeItem(String,String). If the second argument, i.e. the descriptor name is unknown, then use removeItem(String,Repository.getDefaultViewName()).

Removes an item from the Repository permanently. This method is uses the default item descriptor. You should use the other version of removeItem to specify a particular item descriptor.

Parameters:
pItem - the item to remove
Throws:
RepositoryException - if the item could not be deleted

removeItem

void removeItem(java.lang.String pId,
                java.lang.String pDescriptorName)
                throws RepositoryException
Removes an item from the Repository permanently.

Parameters:
pItem - the item to remove
pDescriptorName - the name of the item descriptor that contains this item.
Throws:
RepositoryException - if the item could not be deleted