directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1054331 - in /directory: apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/trigger/ shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/constants/ shared/branches/shared-AP/ldap/src...
Date Sun, 02 Jan 2011 00:17:52 GMT
Author: elecharny
Date: Sun Jan  2 00:17:51 2011
New Revision: 1054331

URL: http://svn.apache.org/viewvc?rev=1054331&view=rev
Log:
Added some schemaConstants for TE

Modified:
    directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
    directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
    directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java

Modified: directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?rev=1054331&r1=1054330&r2=1054331&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
Sun Jan  2 00:17:51 2011
@@ -74,9 +74,6 @@ import org.slf4j.LoggerFactory;
  */
 public class TriggerSpecCache
 {
-    /** the attribute id for prescriptive trigger: prescriptiveTrigger */
-    private static final String PRESCRIPTIVE_TRIGGER_ATTR = "prescriptiveTriggerSpecification";
-
     /** the logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( TriggerSpecCache.class );
 
@@ -145,11 +142,11 @@ public class TriggerSpecCache
                 {
                     ClonedServerEntry resultEntry = results.get();
                     DN subentryDn = resultEntry.getDn();
-                    EntryAttribute triggerSpec = resultEntry.get( PRESCRIPTIVE_TRIGGER_ATTR
);
+                    EntryAttribute triggerSpec = resultEntry.get( SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION
);
 
                     if ( triggerSpec == null )
                     {
-                        LOG.warn( "Found triggerExecutionSubentry '" + subentryDn + "' without
any " + PRESCRIPTIVE_TRIGGER_ATTR );
+                        LOG.warn( "Found triggerExecutionSubentry '" + subentryDn + "' without
any " + SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION );
                         continue;
                     }
 
@@ -170,7 +167,7 @@ public class TriggerSpecCache
     private boolean hasPrescriptiveTrigger( Entry entry ) throws LdapException
     {
         // only do something if the entry contains prescriptiveTrigger
-        EntryAttribute triggerSpec = entry.get( PRESCRIPTIVE_TRIGGER_ATTR );
+        EntryAttribute triggerSpec = entry.get( SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION
);
 
         return triggerSpec != null;
     }
@@ -179,7 +176,7 @@ public class TriggerSpecCache
     public void subentryAdded( DN normName, Entry entry ) throws LdapException
     {
         // only do something if the entry contains prescriptiveTrigger
-        EntryAttribute triggerSpec = entry.get( PRESCRIPTIVE_TRIGGER_ATTR );
+        EntryAttribute triggerSpec = entry.get( SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION
);
 
         if ( triggerSpec == null )
         {
@@ -234,7 +231,7 @@ public class TriggerSpecCache
 
         for ( Modification mod : mods )
         {
-            isTriggerSpecModified |= mod.getAttribute().contains( PRESCRIPTIVE_TRIGGER_ATTR
);
+            isTriggerSpecModified |= mod.getAttribute().contains( SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION
);
         }
 
         if ( isTriggerSpecModified )

Modified: directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java?rev=1054331&r1=1054330&r2=1054331&view=diff
==============================================================================
--- directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
(original)
+++ directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/constants/SchemaConstants.java
Sun Jan  2 00:17:51 2011
@@ -976,4 +976,7 @@ public final class SchemaConstants
     // TriggerExecutionInnerArea
     public final static String TRIGGER_EXECUTION_INNER_AREA                   = "triggerExecutionInnerArea";
     public final static String TRIGGER_EXECUTION_INNER_AREA_OID               = "1.3.6.1.4.1.18060.0.4.1.6.2";
+    
+    // PrescriptiveTriggerSpecification
+    public static final String PRESCRIPTIVE_TRIGGER_SPECIFICATION             = "prescriptiveTriggerSpecification";
 }

Modified: directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java?rev=1054331&r1=1054330&r2=1054331&view=diff
==============================================================================
--- directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
(original)
+++ directory/shared/branches/shared-AP/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
Sun Jan  2 00:17:51 2011
@@ -41,9 +41,7 @@ import org.apache.directory.shared.ldap.
 public final class TriggerUtils
 {
     public static final String TRIGGER_EXECUTION_SPECIFIC_AREA_VALUE = SchemaConstants.TRIGGER_EXECUTION_SPECIFIC_AREA;
-    public static final String TRIGGER_EXECUTION_SUBENTRY_OC = "triggerExecutionSubentry";
     public static final String ENTRY_TRIGGER_SPECIFICATION_ATTR = "entryTriggerSpecification";
-    public static final String PRESCRIPTIVE_TRIGGER_SPECIFICATION_ATTR = "prescriptiveTriggerSpecification";
 
 
     /**
@@ -78,9 +76,9 @@ public final class TriggerUtils
         subentry.put( objectClass );
         objectClass.add( SchemaConstants.TOP_OC );
         objectClass.add( SchemaConstants.SUBENTRY_OC );
-        objectClass.add( TRIGGER_EXECUTION_SUBENTRY_OC );
+        objectClass.add( SchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC );
         subentry.put( SchemaConstants.SUBTREE_SPECIFICATION_AT, subtreeSpec );
-        subentry.put( PRESCRIPTIVE_TRIGGER_SPECIFICATION_ATTR, prescriptiveTriggerSpec );
+        subentry.put( SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION, prescriptiveTriggerSpec
);
         apCtx.createSubcontext( "cn=" + subentryCN, subentry );
     }
 
@@ -90,7 +88,7 @@ public final class TriggerUtils
         String subentryCN,
         String triggerSpec ) throws NamingException
     {
-        Attributes changes = new BasicAttributes( PRESCRIPTIVE_TRIGGER_SPECIFICATION_ATTR,
triggerSpec, true );
+        Attributes changes = new BasicAttributes( SchemaConstants.PRESCRIPTIVE_TRIGGER_SPECIFICATION,
triggerSpec, true );
         apCtx.modifyAttributes( "cn=" + subentryCN, DirContext.ADD_ATTRIBUTE, changes );
     }
 



Mime
View raw message