org.jasig.cas.adaptors.ldap.services
Class LdapServiceMapper

java.lang.Object
  extended by org.springframework.ldap.core.simple.AbstractParameterizedContextMapper<RegisteredService>
      extended by org.jasig.cas.adaptors.ldap.services.LdapServiceMapper
All Implemented Interfaces:
org.springframework.ldap.core.ContextMapper, org.springframework.ldap.core.simple.ParameterizedContextMapper<RegisteredService>
Direct Known Subclasses:
DefaultLdapServiceMapper

public abstract class LdapServiceMapper
extends org.springframework.ldap.core.simple.AbstractParameterizedContextMapper<RegisteredService>

The LdapServiceMapper is responsible for how RegisteredService instances are mapped to LDAP Contexts and vice versa

Author:
Siegfried Puchbauer, SPP (http://www.spp.at/)

Constructor Summary
LdapServiceMapper()
           
 
Method Summary
protected abstract  org.springframework.ldap.core.DirContextAdapter createCtx(java.lang.String parentDn, RegisteredService service)
          Create a new DirContextAdapter (set the naming attribute, sub-path etc.)
protected abstract  RegisteredService doMapFromContext(org.springframework.ldap.core.DirContextOperations ctx)
          Method inherited from AbstractParameterizedContextMapper<RegisteredService> Should read the attributes from the DirContextAdapter and create a RegisteredService
protected abstract  org.springframework.ldap.core.DirContextAdapter doMapToContext(RegisteredService service, org.springframework.ldap.core.DirContextAdapter ctx)
          This method should map the properties of the RegisteredService to the DirContextAdapter
protected abstract  org.springframework.ldap.filter.Filter getLoadFilter()
          This method returns the LDAP Filter whichs fetches all Registered Services
protected abstract  org.springframework.ldap.filter.Filter getSearchFilter(java.lang.Long id)
          This method returns the LDAP Filter for finding registered Services based on the given ID
 
Methods inherited from class org.springframework.ldap.core.simple.AbstractParameterizedContextMapper
mapFromContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapServiceMapper

public LdapServiceMapper()
Method Detail

doMapFromContext

protected abstract RegisteredService doMapFromContext(org.springframework.ldap.core.DirContextOperations ctx)
Method inherited from AbstractParameterizedContextMapper<RegisteredService> Should read the attributes from the DirContextAdapter and create a RegisteredService

Specified by:
doMapFromContext in class org.springframework.ldap.core.simple.AbstractParameterizedContextMapper<RegisteredService>
Parameters:
ctx - the DirContextAdapter to read from
Returns:
the created RegisteredServiceImpl instnace

doMapToContext

protected abstract org.springframework.ldap.core.DirContextAdapter doMapToContext(RegisteredService service,
                                                                                  org.springframework.ldap.core.DirContextAdapter ctx)
This method should map the properties of the RegisteredService to the DirContextAdapter

Parameters:
service - the RegisteredService
ctx - the DirContextAdapter
Returns:
the modified DirContextAdapter

createCtx

protected abstract org.springframework.ldap.core.DirContextAdapter createCtx(java.lang.String parentDn,
                                                                             RegisteredService service)
Create a new DirContextAdapter (set the naming attribute, sub-path etc.)

Parameters:
parentDn - the base DN for Registered Services
service - the service
Returns:
the newly created DirContextAdapter

getSearchFilter

protected abstract org.springframework.ldap.filter.Filter getSearchFilter(java.lang.Long id)
This method returns the LDAP Filter for finding registered Services based on the given ID

Parameters:
id - The registered service's ID
Returns:
the LDAP Filter as a org.springframework.ldap.filter.Filter

getLoadFilter

protected abstract org.springframework.ldap.filter.Filter getLoadFilter()
This method returns the LDAP Filter whichs fetches all Registered Services

Returns:
the LDAP Filter as a org.springframework.ldap.filter.Filter


Copyright © 2004-2010 Java Architectures Special Interest Group. All Rights Reserved.