atg.adapter.html
Class SimpleRepository

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.repository.content.ContentRepositoryService
              extended by atg.adapter.html.ImmutableSimpleRepository
                  extended by atg.adapter.html.SimpleRepository
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ContentRepository, atg.repository.DisplayableRepository, MutableRepository, atg.repository.RefreshableRepository, Repository, RepositoryViewContainer, Schedulable, java.util.EventListener
Direct Known Subclasses:
XMLRepositoryService

public class SimpleRepository
extends atg.adapter.html.ImmutableSimpleRepository
implements MutableRepository

HTML Repository implementation.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.adapter.html.ImmutableSimpleRepository
HTML_VIEW_NAME
 
Fields inherited from class atg.repository.content.ContentRepositoryService
DEFAULT_GROUP_REGISTRY, mContentIndex, NULL_VALUE_ID, PATH_SEPARATOR, PATH_SEPARATOR_CHAR, RELATIVEPATH_PROPERTYNAME, ROOT_FOLDER_ID
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
SimpleRepository()
          Constructs a SimpleRepository
 
Method Summary
 RepositoryItem addItem(MutableRepositoryItem pItem)
          Adds the supplied item populated to the repository
 RepositoryItem addItem(RepositoryItem pItem, java.lang.String pDescriptorName)
          Adds the supplied item populated to the repository
 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
 java.lang.String getDefaultFileExtension()
          Get property defaultFileExtension
 IdGenerator getDefaultIdGenerator()
          Get property DefaultIdGenerator
 IdGenerator getIdGenerator()
          Get property idGenerator
 MutableRepositoryItem getItemForUpdate(java.lang.String pId)
          If one wants write access to an item it should be retrieved through this method
 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)
          Removes an item from the Repository permantly
 void removeItem(java.lang.String pId, java.lang.String pDescriptorName)
          Removes an item from the Repository permantly
 void setDefaultFileExtension(java.lang.String pDefaultFileExtension)
          Set property defaultFileExtension
 void setIdGenerator(IdGenerator pIdGenerator)
          Set property idGenerator
 void updateItem(MutableRepositoryItem pItem)
          Updates the item's values into the Repository
 
Methods inherited from class atg.adapter.html.ImmutableSimpleRepository
doStartService, getDataStore, getDefaultViewName, initializeData, isLoadDataOnStartup, isRebuildDataOnStartup, loadData, loadDataForItem, performScheduledTask, rebuildData, refresh, setDataStore, setDefaultViewName, setLoadDataOnStartup, setRebuildDataOnStartup
 
Methods inherited from class atg.repository.content.ContentRepositoryService
createAdminServlet, doStopService, getComponentResourceBundleName, getContentIndex, getContentRootPathProvider, getFolder, getFolderByPath, getFolders, getFoldersByPath, getGroupRegistry, getItem, getItem, getItemByPath, getItemDescriptor, getItemDescriptor, getItemDescriptor, getItemDescriptorNames, getItems, getItems, getItemsByPath, getPathSeparator, getQueryCache, getRepositoryDisplayName, getRepositoryDisplayNameResource, getRepositoryName, getRootFolder, getScheduler, getUpdateSchedule, getView, getView, getViewNames, getViews, isQueryCacheEnabled, setComponentResourceBundleName, setContentRootPathProvider, setGroupRegistry, setItemDescriptor, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingWarning, setQueryCache, setQueryCacheEnabled, setRepositoryDisplayNameResource, setRepositoryName, setScheduler, setUpdateSchedule, setViews
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingTrace, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface atg.repository.Repository
getDefaultViewName, getItem, getItem, getItemDescriptor, getItemDescriptor, getItemDescriptorNames, getItems, getItems, getRepositoryName, getView, getView, getViewNames
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

SimpleRepository

public SimpleRepository()
Constructs a SimpleRepository

Method Detail

setIdGenerator

public void setIdGenerator(IdGenerator pIdGenerator)
Set property idGenerator

Parameters:
pIdGenerator - new value to set

getIdGenerator

public IdGenerator getIdGenerator()
Get property idGenerator

Returns:
idGenerator

getDefaultIdGenerator

public IdGenerator getDefaultIdGenerator()
Get property DefaultIdGenerator

Returns:
DefaultIdGenerator

setDefaultFileExtension

public void setDefaultFileExtension(java.lang.String pDefaultFileExtension)
Set property defaultFileExtension

Parameters:
pDefaultFileExtension - new value to set

getDefaultFileExtension

public java.lang.String getDefaultFileExtension()
Get property defaultFileExtension

Returns:
defaultFileExtension

getItemForUpdate

public MutableRepositoryItem getItemForUpdate(java.lang.String pId)
                                       throws RepositoryException
If one wants write access to an item it should be retrieved through this method

Specified by:
getItemForUpdate in interface MutableRepository
Parameters:
pId - the id of the item to update.
Returns:
null if no item with the given id can be found
Throws:
RepositoryException - if the item could not be retreived for updates

getItemForUpdate

public 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

Specified by:
getItemForUpdate in interface MutableRepository
Parameters:
pId - the id of the item to update.
pDescriptorName - the name of the type of item to update.
Returns:
null if no item with the given id can be found
Throws:
RepositoryException - if the item could not be retreived for updates

getItemsForUpdate

public 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

Specified by:
getItemsForUpdate in interface MutableRepository
Returns:
null if no items with the given ids can be found
Throws:
RepositoryException - if an item could not be retreived for updates

getItemsForUpdate

public 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

Specified by:
getItemsForUpdate in interface MutableRepository
Parameters:
pIds - the list of ids of items to retrieve for update
pDescriptorName - the name of the item descriptor that contains these items.
Returns:
null if no items with the given ids can be found
Throws:
RepositoryException - if an item could not be retreived for updates

createItem

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

Specified by:
createItem in interface MutableRepository
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

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

Specified by:
createItem in interface MutableRepository
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

public RepositoryItem addItem(RepositoryItem pItem,
                              java.lang.String pDescriptorName)
                       throws RepositoryException
Adds the supplied item populated to the repository

Specified by:
addItem in interface MutableRepository
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

public RepositoryItem addItem(MutableRepositoryItem pItem)
                       throws RepositoryException
Adds the supplied item populated to the repository

Specified by:
addItem in interface MutableRepository
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

updateItem

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

Specified by:
updateItem in interface MutableRepository
Parameters:
pItem - the item to update
Throws:
RepositoryException - if the item could not be updated

removeItem

public void removeItem(java.lang.String pId)
                throws RepositoryException
Removes an item from the Repository permantly

Specified by:
removeItem in interface MutableRepository
Parameters:
pItem - the item to remove
Throws:
RepositoryException - if the item could not be deleted

removeItem

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

Specified by:
removeItem in interface MutableRepository
Parameters:
pItem - the item to remove
Throws:
RepositoryException - if the item could not be deleted