SAP NetWeaver 7.1 Composition Environment

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

SAP NetWeaver 7.1 Composition Environment

Copyright © 2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.