continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ri...@apache.org
Subject svn commit: r489959 - /maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
Date Sun, 24 Dec 2006 00:37:00 GMT
Author: rinku
Date: Sat Dec 23 16:37:00 2006
New Revision: 489959

URL: http://svn.apache.org/viewvc?view=rev&rev=489959
Log:
o  added conveniences to determine availability of group and project keys. 
o  javadocs.

Modified:
    maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java

Modified: maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java?view=diff&rev=489959&r1=489958&r2=489959
==============================================================================
--- maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
(original)
+++ maven/continuum/branches/key-based-refactor/continuum-api/src/main/java/org/apache/maven/continuum/key/GroupProjectKey.java
Sat Dec 23 16:37:00 2006
@@ -1,4 +1,8 @@
 package org.apache.maven.continuum.key;
+
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectGroup;
+
 /*
  * Copyright 2006 The Apache Software Foundation.
  *
@@ -16,34 +20,81 @@
  */
 
 /**
- * GroupProjectKey:
+ * Wraps up the data necessary for distinguishing a group or an
+ * individual project.
  *
  * @author: Jesse McConnell <jmcconnell@apache.org>
  * @version: $ID:$
  */
 public class GroupProjectKey
 {
+    /**
+     * String based unique key for a {@link ProjectGroup}. 
+     */
     private String groupKey;
 
+    /**
+     * String based unique key for a {@link Project} within a 
+     * {@link ProjectGroup}. 
+     */
     private String projectKey;
 
+    /**
+     * Returns the unique {@link ProjectGroup} key.
+     * @return unique {@link ProjectGroup} key.
+     */
     public String getGroupKey()
     {
         return groupKey;
     }
 
+    /**
+     * Sets the unique {@link ProjectGroup} key.
+     * @param groupKey key to set for the {@link ProjectGroup}.
+     */
     public void setGroupKey( String groupKey )
     {
         this.groupKey = groupKey;
     }
 
+    /**
+     * Returns {@link Project} key.
+     * @return Project key.
+     */
     public String getProjectKey()
     {
         return projectKey;
     }
 
+    /**
+     * Sets the {@link Project} key.
+     * @param projectKey key to set for the {@link Project}.
+     */
     public void setProjectKey( String projectKey )
     {
         this.projectKey = projectKey;
+    }
+
+    /**
+     * Determines if there was a group key set for a {@link ProjectGroup} or 
+     * not.
+     *  
+     * @return <code>true</code> if the {@link ProjectGroup} was set, else 
+     *          <code>false</code>.
+     */
+    public boolean hasGroupKey()
+    {
+        return ( null != groupKey && !groupKey.trim().equals( "" ) );
+    }
+
+    /**
+     * Determines if there was a project key set for a {@link Project} or not.
+     *  
+     * @return <code>true</code> if the {@link Project} was set, else 
+     *          <code>false</code>.
+     */
+    public boolean hasProjectKey()
+    {
+        return ( null != projectKey && !projectKey.trim().equals( "" ) );
     }
 }



Mime
View raw message