com.sap.security.api

Class PrincipalIterator

java.lang.Object
  extended by com.sap.security.api.PrincipalIterator
All Implemented Interfaces:
Iterator

public class PrincipalIterator
extends Object
implements Iterator

Class PrincipalIterator is used to change the return type of iterators returned by this API (e.g. IUser.getRoles(...)) The following return types are available:

Example:

Iterator it = user.getRoles(true);
 PrincipalIterator pIterator = new PrincipalIterator(it, PrincipalIterator.ITERATOR_TYPE_PRINCIPALS);
 while (pIterator.hasNext())
 {
        IPrincipal principal = (IPrincipal)pIterator.next();
 }


Field Summary
static int ITERATOR_TYPE_PRINCIPALS
           
static int ITERATOR_TYPE_UNIQUEIDS_CHECKED
           
static int ITERATOR_TYPE_UNIQUEIDS_NOT_CHECKED
           
protected  AttributeList mAttributeList
           
protected  boolean mCaseSensitivity
           
protected  String mPrincipalType
           
protected  String mSearchCriteria
           
protected  int mSearchMode
           
protected  int mType
           
protected static String VERSIONSTRING
           
 
Constructor Summary
protected PrincipalIterator()
           
  PrincipalIterator(Iterator iterator)
          Constructor of PrincipalIterator.
  PrincipalIterator(Iterator iterator, int type)
          Constructor of PrincipalIterator where the return type can be expicitely specified.
  PrincipalIterator(Iterator iterator, int type, AttributeList attributeList)
          Constructor of PrincipalIterator where the return type can be expicitely specified.
  PrincipalIterator(Iterator iterator, int type, AttributeList attributeList, String searchCriteria, String principalType, int mode, boolean caseSensitive)
          Constructor of PrincipalIterator where the return type can be expicitely specified.
 
Method Summary
 boolean hasNext()
          Checks whether there are more objects.
protected  void init()
           
 Object next()
          Returns the next object.
 void remove()
          This method is not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSIONSTRING

protected static final String VERSIONSTRING
See Also:
Constant Field Values

ITERATOR_TYPE_UNIQUEIDS_CHECKED

public static final int ITERATOR_TYPE_UNIQUEIDS_CHECKED
See Also:
Constant Field Values

ITERATOR_TYPE_UNIQUEIDS_NOT_CHECKED

public static final int ITERATOR_TYPE_UNIQUEIDS_NOT_CHECKED
See Also:
Constant Field Values

ITERATOR_TYPE_PRINCIPALS

public static final int ITERATOR_TYPE_PRINCIPALS
See Also:
Constant Field Values

mAttributeList

protected AttributeList mAttributeList

mType

protected int mType

mSearchCriteria

protected String mSearchCriteria

mPrincipalType

protected String mPrincipalType

mSearchMode

protected int mSearchMode

mCaseSensitivity

protected boolean mCaseSensitivity
Constructor Detail

PrincipalIterator

protected PrincipalIterator()

PrincipalIterator

public PrincipalIterator(Iterator iterator,
                         int type)
Constructor of PrincipalIterator where the return type can be expicitely specified.

Parameters:
iterator - the original iterator, which was returned by UME objects
type - the type which should be returned by the next()-method

PrincipalIterator

public PrincipalIterator(Iterator iterator,
                         int type,
                         AttributeList attributeList)
Constructor of PrincipalIterator where the return type can be expicitely specified.

Parameters:
iterator - the original iterator, which was returned by UME objects
type - the type which should be returned by the next()-method
attributeList - the attributes which are read and returned during the existence check

PrincipalIterator

public PrincipalIterator(Iterator iterator,
                         int type,
                         AttributeList attributeList,
                         String searchCriteria,
                         String principalType,
                         int mode,
                         boolean caseSensitive)
Constructor of PrincipalIterator where the return type can be expicitely specified.

Parameters:
iterator - the original iterator, which was returned by UME objects
type - the type which should be returned by the next()-method
attributeList - the attributes which are read and returned during the existence check
searchCriteria - simple search criteria to filter the elements
principalType - the principal types that should be returned
mode - the search mode defined in ISearchAttribute
caseSensitive - The case sensitivity

PrincipalIterator

public PrincipalIterator(Iterator iterator)
Constructor of PrincipalIterator. A PrincipalIterator which was instanciated by this constructor will return the default type (IPrincipal objects where the existence is checked).

Parameters:
iterator - the original iterator, which was returned by UME objects
Method Detail

init

protected void init()

hasNext

public boolean hasNext()
Checks whether there are more objects.

Specified by:
hasNext in interface Iterator

next

public Object next()
Returns the next object.

Specified by:
next in interface Iterator
Throws:
NoSuchElementException - if there are no more objects to return.

remove

public void remove()
This method is not supported.

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException
Access Rights

This class can be accessed from:


SC DC
[sap.com] ENGINEAPI [sap.com] com.sap.security.api.sda
[sap.com] ENGFACADE [sap.com] tc/je/usermanagement/api
[sap.com] CORE-TOOLS [sap.com] com.sap.engine.client.lib


Copyright 2010 SAP AG Complete Copyright Notice