You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Ersin Er (JIRA)" <ji...@apache.org> on 2007/08/17 10:00:36 UTC

[jira] Closed: (DIRSERVER-671) interceptor identifiers as service names: type safity

     [ https://issues.apache.org/jira/browse/DIRSERVER-671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ersin Er closed DIRSERVER-671.
------------------------------


> interceptor identifiers as service names: type safity
> -----------------------------------------------------
>
>                 Key: DIRSERVER-671
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-671
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>          Components: core
>            Reporter: Ersin Er
>            Assignee: Emmanuel Lecharny
>            Priority: Trivial
>             Fix For: 1.5.1
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.