org.figure8.join.services.repository
Class AbstractStructuredRepository

java.lang.Object
  extended by org.figure8.join.services.repository.AbstractStructuredRepository
All Implemented Interfaces:
Repository
Direct Known Subclasses:
SimpleFileSystemRepository, VFSRepository

public abstract class AbstractStructuredRepository
extends java.lang.Object
implements Repository

This is a base class for structured repository, ie: repository having a root (path, URL or whatever ...) and storing artifacts using an internal tree-styled structure.
This abstract implementation proposes to express structure using Ant-styled properties that will be replaced at runtime by artifact properties. Such properties are : ${release}, ${uniqueId}, ${versionInfo} and ${categoryInfo}. The default structure is: ${categoryInfo}/${release}.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
static java.lang.String CATEGORY_PROPERTY
          Structure property relating to the Artifact category info.
static java.lang.String DEFAULT_STRUCTURE
          Repository default structure definition.
static java.lang.String ID_PROPERTY
          Structure property relating to the Artifact unique id.
static java.lang.String RELEASE_PROPERTY
          Structure property relating to the Artifact Release name.
static java.lang.String VERSION_PROPERTY
          Structure property relating to the Artifact version info.
 
Constructor Summary
AbstractStructuredRepository()
           
 
Method Summary
 java.lang.String getStructureDefinition()
           
protected  java.lang.String getStructurePath(Artifact artifact)
          Return the relative path of Artifact within repository structure according to the structure definition.
 void setStructureDefinition(java.lang.String definition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.figure8.join.services.repository.Repository
getArtifact, storeArtifact, storeArtifact
 

Field Detail

DEFAULT_STRUCTURE

public static final java.lang.String DEFAULT_STRUCTURE
Repository default structure definition.

See Also:
Constant Field Values

ID_PROPERTY

public static final java.lang.String ID_PROPERTY
Structure property relating to the Artifact unique id.

See Also:
Constant Field Values

RELEASE_PROPERTY

public static final java.lang.String RELEASE_PROPERTY
Structure property relating to the Artifact Release name.

See Also:
Constant Field Values

CATEGORY_PROPERTY

public static final java.lang.String CATEGORY_PROPERTY
Structure property relating to the Artifact category info.

See Also:
Constant Field Values

VERSION_PROPERTY

public static final java.lang.String VERSION_PROPERTY
Structure property relating to the Artifact version info.

See Also:
Constant Field Values
Constructor Detail

AbstractStructuredRepository

public AbstractStructuredRepository()
Method Detail

setStructureDefinition

public void setStructureDefinition(java.lang.String definition)
Parameters:
definition - Repository internal structure definition

getStructureDefinition

public java.lang.String getStructureDefinition()
Returns:
Repository internal structure definition

getStructurePath

protected java.lang.String getStructurePath(Artifact artifact)
Return the relative path of Artifact within repository structure according to the structure definition.

Parameters:
artifact - The artifact for whom getting relative path
Returns:
The relative path of artifact within repotisoty


Copyright © 2005-2008 Join. All Rights Reserved.