continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzurb...@apache.org
Subject svn commit: r887850 - /continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
Date Mon, 07 Dec 2009 06:53:33 GMT
Author: jzurbano
Date: Mon Dec  7 06:53:32 2009
New Revision: 887850

URL: http://svn.apache.org/viewvc?rev=887850&view=rev
Log:
[CONTINUUM-2373] - Distributed Master needs more detailed logging
* added getProjectGroupId() to be used when project id is not retrieved from context


Modified:
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java

Modified: continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java?rev=887850&r1=887849&r2=887850&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
(original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
Mon Dec  7 06:53:32 2009
@@ -27,6 +27,8 @@
 public class ContinuumDistributedUtil
 {
     public static final String KEY_PROJECT_ID = "project-id";
+    
+    public static final String KEY_PROJECT_GROUP_ID = "project-group-id";
 
     public static final String KEY_PROJECT_NAME = "project-name";
 
@@ -37,6 +39,11 @@
         return getInteger( context, KEY_PROJECT_ID );
     }
 
+    public static int getProjectGroupId( Map<String, Object> context )
+    {
+        return getInteger( context, KEY_PROJECT_GROUP_ID );
+    }
+
     public static String getArtifactId( Map<String, Object> context )
     {
         return getString( context, KEY_ARTIFACT_ID );
@@ -59,7 +66,15 @@
         {
             result.append( getArtifactId( context ) ).append( " " );
         }
-        result.append( "(projectId=" ).append( getProjectId( context ) ).append( ")" );
+        
+        if ( context.containsKey( KEY_PROJECT_ID ) )
+        {
+            result.append( "(projectId=" ).append( getProjectId( context ) ).append( ")"
);
+        }
+        else
+        {
+            result.append( "(projectGroupId=" ).append( getProjectGroupId( context ) ).append(
")" );
+        }
         
         return result.toString();
     }



Mime
View raw message