org.lsc.service
Class JndiDataSchemaProvider

java.lang.Object
  extended by org.lsc.service.JndiDataSchemaProvider
All Implemented Interfaces:
DataSchemaProvider

public class JndiDataSchemaProvider
extends Object
implements DataSchemaProvider

This class provides the data schema by reading the directory schema

Author:
Sebastien Bahloul <seb@lsc-project.org>

Field Summary
static org.slf4j.Logger LOGGER
          This is the local logger.
 
Constructor Summary
JndiDataSchemaProvider(JndiServices js, String className)
          Initialize the data schema provider by reading the directory schema and looking for the specified objectclass name
 
Method Summary
 String filterName(String name)
          Filter name according to attribute or object class
 Class<?> getElementSingleType(String elementName)
          TODO Refactor to return the good type
 Collection<String> getElementsName()
          List of attributes authorized for this object
 boolean isElementMandatory(String elementName)
          Unsupported at this time !
 boolean isElementMultivalued(String elementName)
          Return true if the attribute is not marked as SINGLE-VALUE
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

public static final org.slf4j.Logger LOGGER
This is the local logger.

Constructor Detail

JndiDataSchemaProvider

public JndiDataSchemaProvider(JndiServices js,
                              String className)
                       throws NamingException
Initialize the data schema provider by reading the directory schema and looking for the specified objectclass name

Parameters:
js -
className -
Throws:
NamingException
Method Detail

filterName

public String filterName(String name)
Filter name according to attribute or object class

Parameters:
name - the original name
Returns:
the filtered name or null if not matching

getElementsName

public Collection<String> getElementsName()
List of attributes authorized for this object

Specified by:
getElementsName in interface DataSchemaProvider
Returns:
the attributes name collection

getElementSingleType

public Class<?> getElementSingleType(String elementName)
TODO Refactor to return the good type

Specified by:
getElementSingleType in interface DataSchemaProvider
Parameters:
elementName -
Returns:
The @link Class type for this attribute

isElementMandatory

public boolean isElementMandatory(String elementName)
Unsupported at this time !

Specified by:
isElementMandatory in interface DataSchemaProvider
Parameters:
elementName -
Returns:
The attribute's mandatory status

isElementMultivalued

public boolean isElementMultivalued(String elementName)
Return true if the attribute is not marked as SINGLE-VALUE

Specified by:
isElementMultivalued in interface DataSchemaProvider
Parameters:
elementName -
Returns:
the attribute multi-valued status
Throws:
MissingFormatArgumentException - is the attribute is unknown


Copyright © 2005-2010 LSC project. All Rights Reserved.