You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2004/07/06 16:49:30 UTC
svn commit: rev 22628 - avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model
Author: mcconnell
Date: Tue Jul 6 07:49:29 2004
New Revision: 22628
Modified:
avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Context.java
avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Home.java
Log:
more docs
Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Context.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Context.java (original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Context.java Tue Jul 6 07:49:29 2004
@@ -39,39 +39,123 @@
*/
public class Context extends Task
{
+ /**
+ * The reference name of the context object withing the current
+ * ant project.
+ */
public static final String KEY = "project.context";
+
+ /**
+ * The property name of the project key.
+ */
public static final String PROJECT_KEY = "project.key";
+
+ /**
+ * The value of the immutable target directory name.
+ */
public static final String TARGET = "target";
+
+ /**
+ * The value of the immutable target build directory name.
+ */
public static final String BUILD = "build";
+
+ /**
+ * The value of the immutable target classes directory name.
+ */
public static final String CLASSES = "classes";
+
+ /**
+ * The value of the immutable target deliverables directory name.
+ */
public static final String DELIVERABLES = "deliverables";
+
+ /**
+ * The value of the immutable target test classes directory name.
+ */
public static final String TEST_CLASSES = "test-classes";
+
+ /**
+ * The value of the immutable target test reports directory name.
+ */
public static final String TEST_REPORTS = "test-reports";
+
+ /**
+ * The value of the immutable target temp directory name.
+ */
public static final String TEMP = "temp";
+
+ /**
+ * The value of the immutable target test directory name.
+ */
public static final String TEST = "test";
+
+ /**
+ * The value of the immutable target docs directory name.
+ */
public static final String DOCS = "docs";
+ /**
+ * The value of the immutable user.properties filename.
+ */
private static final String USER_PROPERTIES = "user.properties";
+
+ /**
+ * The value of the immutable build.properties filename.
+ */
private static final String BUILD_PROPERTIES = "build.properties";
+ /**
+ * The value of the immutable project.src property key.
+ */
public static final String SRC_KEY = "project.src";
+
+ /**
+ * The value of the default project.src property value.
+ */
public static final String SRC_VALUE = "src";
+ /**
+ * The value of the default project.src.main property value.
+ */
public static final String SRC_MAIN = "main";
+
+ /**
+ * The value of the immutable project.src.main key.
+ */
public static final String SRC_MAIN_KEY = "project.src.main";
+ /**
+ * The value of the immutable project.src.config key.
+ */
public static final String SRC_CONFIG_KEY = "project.src.conf";
+
+ /**
+ * The value of the default project.src.cofig property value.
+ */
public static final String SRC_CONFIG = "conf";
public static final String SRC_TEST_KEY = "project.src.test";
+
+ /**
+ * The value of the default project.src.test property value.
+ */
public static final String SRC_TEST = "test";
+ /**
+ * The value of the immutable project.etc key.
+ */
public static final String ETC_KEY = "project.etc";
+
+ /**
+ * The value of the default project.etc default value.
+ */
public static final String ETC_VALUE = "etc";
/**
- * If the project does not have a refernce assigned to
+ * Reuturn the context object for the project.
+ * If the project does not have a reference assigned to
* the name 'project.context' then a new context is created and
* assigned.
*
@@ -115,6 +199,10 @@
private File m_docs;
private File m_test;
+ /**
+ * Set the unique key for this project.
+ * @param key the unique key
+ */
public void setKey( final String key )
{
m_key = key;
Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Home.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Home.java (original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/model/Home.java Tue Jul 6 07:49:29 2004
@@ -40,6 +40,8 @@
import java.util.Date;
/**
+ * A Home is an immutable data object that aggregates a suite of buildable
+ * project defintions relative to local and external dependencies.
*
* @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a>
* @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
@@ -73,6 +75,12 @@
// constructor
//-------------------------------------------------------------
+ /**
+ * Creation of a new home using a supplied index.
+ * @param project the ant project establishing the home
+ * @param magic the magic system instance
+ * @param index the magic project index
+ */
protected Home( Project project, Magic system, File index )
{
setProject( project );
@@ -93,46 +101,84 @@
// implementation
//-------------------------------------------------------------
+ /**
+ * Return the index file used to establish this home.
+ * @return the index file
+ */
public File getIndex()
{
return m_index;
}
+ /**
+ * Return the last modification time of the index file as a long.
+ * @return the last modification time
+ */
public long getIndexLastModified()
{
return m_index.lastModified();
}
+ /**
+ * Return a property declared undr the project that established the root index.
+ * @param key the property key
+ * @return the value matching the supplied property key
+ */
public String getProperty( String key )
{
return m_project.getProperty( key );
}
+ /**
+ * Return TRUE if the supplied key is the name of a key of a resource
+ * declared within this home.
+ * @param key the key
+ */
public boolean isaResourceKey( String key )
{
return ( null != m_resources.get( key ) );
}
+ /**
+ * Return TRUE if the runtime is initiated by gump.
+ * @return TRUE if gumpt is running the show
+ */
public boolean isGump()
{
return ( null != getGumpSignature() );
}
+ /**
+ * Return the gump build signature.
+ * @return a string corresponding to the gump @@DATE@@ value.
+ */
public String getGumpSignature()
{
return m_system.getGumpSignature();
}
+ /**
+ * Return the immutable repository descriptor for the main cache.
+ * @return the main cache repository descriptor
+ */
public Repository getRepository()
{
return m_system.getRepository();
}
+ /**
+ * Return the immutable docs repository cache descriptor.
+ * @return the docs repository descriptor
+ */
public Repository getDocsRepository()
{
return m_system.getDocsRepository();
}
+ /**
+ * Return all of the resource declared within this home.
+ * @return the resource defintions
+ */
public Resource[] getResources()
{
return (Resource[]) m_resources.values().toArray( new Resource[0] );
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org