directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ersin Er (JIRA)" <j...@apache.org>
Subject [jira] Created: (DIRSERVER-671) interceptor identifiers as service names: type safity
Date Wed, 12 Jul 2006 13:17:29 GMT
interceptor identifiers as service names: type safity
-----------------------------------------------------

         Key: DIRSERVER-671
         URL: http://issues.apache.org/jira/browse/DIRSERVER-671
     Project: Directory ApacheDS
        Type: Improvement

  Components: core  
    Reporter: Ersin Er
    Priority: Trivial


We have several lookup bypass filters in interceptors. Those filters are formed by adding
names of some interceptors literally to a collection. However this is not a type safe way
and we loose the refactoring capabilities of the IDE also. What we need to do is to define
a public final static field in each interceptor to hold its string identifier. So we can add
that field to required bypass filters.

For instance the trigger service has a field lke this:

public class TriggerService extends BaseInterceptor
{
    public static final String SERVICE_NAME = "triggerService";
...

And a bypass filter can be formed using that as follows:

...
Set c = new HashSet();
c.add( "authenticationService" );
c.add( "authorizationService" );
c.add( "defaultAuthorizationService" );
c.add( "schemaService" );
c.add( "subentryService" );
c.add( "operationalAttributeService" );
c.add( "eventService" );
c.add( TriggerService.SERVICE_NAME ); // <<<-----
USERLOOKUP_BYPASS = Collections.unmodifiableCollection( c );
...

BTW, we also have interceptors' names in the spring configuration but there does not seem
to exist a good way to use it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message