## com.arsdigita.docmgr
Class Repository

    java.lang.Object
      com.arsdigita.domain.DomainObject
          com.arsdigita.domain.ObservableDomainObject
              com.arsdigita.kernel.ACSObject
                  com.arsdigita.kernel.Resource
                      com.arsdigita.web.Application
                          com.arsdigita.docmgr.Repository

All Implemented Interfaces:
  Constants

public class Repository
extends com.arsdigita.web.Application
implements Constants

A repository is the application that provides access to files and folders.

Author:
  Stefan Deusch (stefan@arsdigita.com), Ron Henderson (ron@arsdigita.com)

Field Summary
`static String` `BASE_DATA_OBJECT_TYPE`

Fields inherited from class com.arsdigita.web.Application
`PRIMARY_URL, versionId`

Fields inherited from class com.arsdigita.kernel.Resource
`CHILD_RESOURCE, DESCRIPTION, PARENT_RESOURCE, RESOURCE_TYPE, TIMESTAMP, TITLE`

Fields inherited from class com.arsdigita.kernel.ACSObject
`CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE`

Fields inherited from interface com.arsdigita.docmgr.Constants
`ACTION, CONTENT, DESCRIPTION, DURATION, FOLDER_ID, IS_FOLDER, LAST_MODIFIED_DATE, MIME_TYPE_LABEL, NAME, OBJECT_ID, PARENT, PARTY_ID, PATH, REPOSITORIES_MOUNTED, SIZE, TEXT_HTML, TEXT_PLAIN, TYPE, USER_ID`

Constructor Summary
`Repository(BigDecimal id)` Constructor.
`Repository(com.arsdigita.persistence.DataObject obj)` Constructs a repository from the underlying data object.
`Repository(com.arsdigita.persistence.OID oid)` Retreives a repository from the database usings its OID.

Method Summary
`protected void` `afterSave()` Grant write permission to the Portal participants.
`protected void` `beforeSave()`
`static Repository` `create(String urlName, String title, com.arsdigita.web.Application parent)` This is called when the application is created.
`protected String` `getBaseDataObjectType()`
`static Repository` `getCurrentRepository(HttpServletRequest req)`
`com.arsdigita.kernel.Party` `getOwner()` Returns the party owning the repository.
`static ResourceImplCollection` `getRecentlyModifiedDocuments()`
`static ResourceImplCollection` `getRecentlyModifiedDocuments(Repository rep)`
`Folder` `getRoot()`
`static Resource` `retrieveResource(String absPath)` Convenience method to retrieve a resource (file or folder) by absolute path name.

Methods inherited from class com.arsdigita.web.Application

`afterDelete, beforeDelete, createApplication, createApplication, createRootApplication, getAncestorApplications, getApplicationType, getCanonicalURL, getChildApplications, getChildApplicationsForType, getContainingApplication, getContextPath, getCurrentApplication, getPackageType, getParentApplication, getPath, getPrimaryURL, getRelevantPrivileges, getServletPath, getSiteNode, getStylesheetPath, isInstalled, retrieveAllApplications, retrieveApplication, retrieveApplication, retrieveApplication, retrieveApplicationForPath, retrieveApplicationForSiteNode, setApplicationType, setParentApplication, setPath`

Methods inherited from class com.arsdigita.kernel.Resource
`createResource, createResource, getChildResources, getContainer, getContainingResource, getDescription, getDisplayName, getParentResource, getResourceType, getTimestamp, getTitle, isContainerModified, retrieveAllResources, retrieveResource, retrieveResource, retrieveResource, setDescription, setParentResource, setResourceType, setTitle`

Methods inherited from class com.arsdigita.kernel.ACSObject
`assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, setID, setID`

Methods inherited from class com.arsdigita.domain.ObservableDomainObject
`addObserver, getObservers`

Methods inherited from class com.arsdigita.domain.DomainObject
`add, add, addToAssociation, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### BASE_DATA_OBJECT_TYPE

    public static final String BASE_DATA_OBJECT_TYPE

See Also:
  Constant Field Values

Constructor Detail

### Repository

    public Repository(com.arsdigita.persistence.OID oid)
               throws com.arsdigita.domain.DataObjectNotFoundException

  Retreives a repository from the database usings its OID.

Parameters:
  `oid` - the OID of the repository

### Repository

    public Repository(BigDecimal id)
               throws com.arsdigita.domain.DataObjectNotFoundException

  Constructor. The contained `DataObject` is retrieved from the persistent storage mechanism with an `OID` specified by id.

Parameters:
  `id` - The `id` for the retrieved `DataObject`.

### Repository

    public Repository(com.arsdigita.persistence.DataObject obj)

  Constructs a repository from the underlying data object.

Method Detail

### getBaseDataObjectType

    protected String getBaseDataObjectType()

### beforeSave

    protected void beforeSave()

### afterSave

    protected void afterSave()

  Grant write permission to the Portal participants.

### create

    public static Repository create(String urlName,
                                    String title,
                                    com.arsdigita.web.Application parent)

  This is called when the application is created.

### retrieveResource

    public static Resource retrieveResource(String absPath)

  Convenience method to retrieve a resource (file or folder) by absolute path name.

### getOwner

    public com.arsdigita.kernel.Party getOwner()

  Returns the party owning the repository.

  Returns:
    the party owning the repository.

### getRoot

    public Folder getRoot()

  Returns:
    the root file folder for this repository

### getRecentlyModifiedDocuments

    public static ResourceImplCollection getRecentlyModifiedDocuments()

### getRecentlyModifiedDocuments

    public static ResourceImplCollection getRecentlyModifiedDocuments(Repository rep)

### getCurrentRepository

    public static Repository getCurrentRepository(HttpServletRequest req)

Copyright (c) 2006 Red Hat, Inc. Corporation. All Rights Reserved. Generated at June 1 2006:1113 UTC