issrg.utils.repository
Class DefaultRepository
java.lang.Object
issrg.utils.repository.DefaultRepository
- All Implemented Interfaces:
- AttributeRepository
- Direct Known Subclasses:
- FileRepository, LDAPRepository, MultiRepository, SAMLRepository, WebDAVRepository
public abstract class DefaultRepository
- extends java.lang.Object
- implements AttributeRepository
This class is an implementation of default getAttribute and getAllAttributes
behaviour, which is the same as getAttributes(entry, new String{attrId}) in
the first case, and getAttributes(entry, null) in the second case.
It is an abstract class, and the getAttributes method still has to
be implemented.
- Version:
- 0.2
- Author:
- A Otenko
Method Summary |
javax.naming.directory.Attributes |
getAllAttributes(java.security.Principal DN)
This method gets all the attributes from the entry with the DN. |
javax.naming.directory.Attribute |
getAttribute(java.security.Principal DN,
java.lang.String AttributeName)
This method gets the named attribute from the entry with the DN. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultRepository
public DefaultRepository()
getAttribute
public javax.naming.directory.Attribute getAttribute(java.security.Principal DN,
java.lang.String AttributeName)
throws RepositoryException
- This method gets the named attribute from the entry with the DN. It does
effectively the same as
getAttributes(DN, new String[]{AttributeName}).get(AttributeName);
- Specified by:
getAttribute
in interface AttributeRepository
- Parameters:
DN
- The distinguished nameAttributeName
- The LDAP name for the attribute
- Returns:
- Attribute containing all the values that could be retrieved;
null, if for any reason no attribute values could be retrieved;
the status and diagnosis are refreshed
- Throws:
RepositoryException
- See Also:
AttributeRepository.getAttributes(java.security.Principal,String[])
getAllAttributes
public javax.naming.directory.Attributes getAllAttributes(java.security.Principal DN)
throws RepositoryException
- This method gets all the attributes from the entry with the DN. It does
the same as
getAttributes(DN, null)
.
- Specified by:
getAllAttributes
in interface AttributeRepository
- Parameters:
DN
- The distinguished name of the entry
- Returns:
- all the attributes that could be retrieved; null, if for any reason
no attribute values can be retrieved; status and diagnosis
are refreshed
- Throws:
RepositoryException
- See Also:
AttributeRepository.getAttributes(java.security.Principal,String[])