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

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

public final class DefaultLdapServiceMapper
extends LdapServiceMapper

Default implementation of LdapServiceMapper which maps each property of RegisteredService to a explicit LDAP attribute

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

Constructor Summary
DefaultLdapServiceMapper()
           
 
Method Summary
protected  org.springframework.ldap.core.DirContextAdapter createCtx(java.lang.String parentDn, RegisteredService servivce)
          Create a new DirContextAdapter (set the naming attribute, sub-path etc.)
protected  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  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  org.springframework.ldap.filter.Filter getLoadFilter()
          This method returns the LDAP Filter whichs fetches all Registered Services
protected  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
 void setIdAttribute(java.lang.String idAttribute)
           
 void setNamingAttribute(java.lang.String namingAttribute)
           
 void setObjectclass(java.lang.String objectclass)
           
 void setServiceAllowedAttributesAttribute(java.lang.String serviceAllowedAttributesAttribute)
           
 void setServiceAllowedToProxyAttribute(java.lang.String serviceAllowedToProxyAttribute)
           
 void setServiceAnonymousAccessAttribute(java.lang.String serviceAnonymousAccessAttribute)
           
 void setServiceDescriptionAttribute(java.lang.String serviceDescriptionAttribute)
           
 void setServiceEnabledAttribute(java.lang.String serviceEnabledAttribute)
           
 void setServiceIdAttribute(java.lang.String serviceIdAttribute)
           
 void setServiceSsoEnabledAttribute(java.lang.String serviceSsoEnabledAttribute)
           
 void setServiceThemeAttribute(java.lang.String serviceThemeAttribute)
           
 
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

DefaultLdapServiceMapper

public DefaultLdapServiceMapper()
Method Detail

doMapFromContext

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

Specified by:
doMapFromContext in class LdapServiceMapper
Parameters:
ctx - the DirContextAdapter to read from
Returns:
the created RegisteredServiceImpl instnace

doMapToContext

protected org.springframework.ldap.core.DirContextAdapter doMapToContext(RegisteredService service,
                                                                         org.springframework.ldap.core.DirContextAdapter ctx)
Description copied from class: LdapServiceMapper
This method should map the properties of the RegisteredService to the DirContextAdapter

Specified by:
doMapToContext in class LdapServiceMapper
Parameters:
service - the RegisteredService
ctx - the DirContextAdapter
Returns:
the modified DirContextAdapter

createCtx

protected org.springframework.ldap.core.DirContextAdapter createCtx(java.lang.String parentDn,
                                                                    RegisteredService servivce)
Description copied from class: LdapServiceMapper
Create a new DirContextAdapter (set the naming attribute, sub-path etc.)

Specified by:
createCtx in class LdapServiceMapper
Parameters:
parentDn - the base DN for Registered Services
servivce - the service
Returns:
the newly created DirContextAdapter

getSearchFilter

protected org.springframework.ldap.filter.Filter getSearchFilter(java.lang.Long id)
Description copied from class: LdapServiceMapper
This method returns the LDAP Filter for finding registered Services based on the given ID

Specified by:
getSearchFilter in class LdapServiceMapper
Parameters:
id - The registered service's ID
Returns:
the LDAP Filter as a org.springframework.ldap.filter.Filter

getLoadFilter

protected org.springframework.ldap.filter.Filter getLoadFilter()
Description copied from class: LdapServiceMapper
This method returns the LDAP Filter whichs fetches all Registered Services

Specified by:
getLoadFilter in class LdapServiceMapper
Returns:
the LDAP Filter as a org.springframework.ldap.filter.Filter

setObjectclass

public void setObjectclass(java.lang.String objectclass)

setServiceIdAttribute

public void setServiceIdAttribute(java.lang.String serviceIdAttribute)

setIdAttribute

public void setIdAttribute(java.lang.String idAttribute)

setServiceDescriptionAttribute

public void setServiceDescriptionAttribute(java.lang.String serviceDescriptionAttribute)

setNamingAttribute

public void setNamingAttribute(java.lang.String namingAttribute)

setServiceEnabledAttribute

public void setServiceEnabledAttribute(java.lang.String serviceEnabledAttribute)

setServiceSsoEnabledAttribute

public void setServiceSsoEnabledAttribute(java.lang.String serviceSsoEnabledAttribute)

setServiceAnonymousAccessAttribute

public void setServiceAnonymousAccessAttribute(java.lang.String serviceAnonymousAccessAttribute)

setServiceAllowedToProxyAttribute

public void setServiceAllowedToProxyAttribute(java.lang.String serviceAllowedToProxyAttribute)

setServiceThemeAttribute

public void setServiceThemeAttribute(java.lang.String serviceThemeAttribute)

setServiceAllowedAttributesAttribute

public void setServiceAllowedAttributesAttribute(java.lang.String serviceAllowedAttributesAttribute)


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