|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides a virtual ObjectEntry enumeration.
A virtual ObjectEntry enumeration may be implemented to provide virtual access to ObjectEntries returned from a namespace. The implementation of the enumeration must support relative approximate positions in the enumeration and an approximate total count of ObjectEntries in the enumeration.
The implementation must also support an enumeration cursor position. This is a relative approximate position in the enumeration and is fully explained in the comments of the getCurrentPosition() method.
Throughout the comments in this class, implementation index refers to specific ObjectEntry indexes in theoretical implementations of the VirtualObjectEntry interface. These indexes differ from the enumeration cursor position. The enumeration cursor position is the position that the enumeration consumer receives when calling methods of this interface. The implementation index refers to the private index of an ObjectEntry in an implementation of VirtualObjectEntryEnumeration
Field Summary | |
static int |
VENUMPOS_AFTERENUM
The enumeration cursor position is after the end of the enumeration. |
static int |
VENUMPOS_BEFOREENUM
The enumeration cursor position is before the start of the enumeration. |
static int |
VENUMPOS_FIRSTENTRY
The enumeration cursor position is on the first entry in the enumeration. |
Method Summary | |
int |
getCount()
Get the approximate total enumeration entry count. |
int |
getCurrentPosition()
Returns the current enumeration cursor position. |
int |
getLastEntryPosition()
Returns the enumeration cursor position for the last entry in the enumeration. |
ObjectEntry[] |
getNext(int count)
Returns the next count entries in the enumeration. |
ObjectEntry[] |
getPrev(int count)
Returns the previous entries in the enumeration, as indicated by the count. |
int |
moveLeft(int count)
Moves the enumeration cursor position toward the left in the enumeration. |
int |
moveRight(int count)
Moves the enumeration cursor position toward the right in the enumeration. |
int |
moveTo(int position)
Moves the enumeration cursor position to the entry associated with the position specified in the enumeration. |
Methods inherited from interface com.novell.application.console.snapin.BrowserObjectEntryEnumeration |
moveFirst, moveLast, moveTo, previous, refresh, setBlockSize |
Methods inherited from interface com.novell.application.console.snapin.ObjectEntryEnumeration |
next |
Methods inherited from interface java.util.Enumeration |
hasMoreElements, nextElement |
Field Detail |
public static final int VENUMPOS_AFTERENUM
The constant value is -2.
public static final int VENUMPOS_BEFOREENUM
The constant value is -1.
public static final int VENUMPOS_FIRSTENTRY
The constant value is 0. The enumeration cursor position for the last entry in the enumeration is obtained by calling the method getLastEntryPosition().
Method Detail |
public int getCount() throws SnapinException
SnapinException
- Thrown by the service provider when an error occurs.public int getCurrentPosition() throws SnapinException
The enumeration cursor position is defined as one of the following:
Given that LASTENTRYPOS is the value returned from the method getLastEntryPosition().
Position values between VENUMPOS_FIRSTENTRY and LASTENTRYPOS indicate a relative approximate position in the enumeration.
SnapinException
- Thrown by the service provider when an error occurs.public int getLastEntryPosition() throws SnapinException
This method allows implementations of VirtualObjectEntryEnumeration to decide the granularity of positioning to provide. The first entry enumeration cursor position is assumed to be zero, but the last entry enumeration cursor position is left to the implementation.
This method always returns the same enumeration cursor position for the last entry during the entire lifetime of the enumeration.
SnapinException
- Thrown by the service provider when an error occurs.public ObjectEntry[] getNext(int count) throws SnapinException
Get the number entries toward the right (end) of the enumeration, as indicated in the count, and move the current enumeration cursor position toward the right of the enumeration.
The movement rules are as follow:
The starting index refers to the implementation index before the getNext() was executed. The ending index refers to the implementation index after the getNext() is executed. A returned entry is an entry in the array returned from getNext().
Always return an ObjectEntry[] with the correct number of entries. Do not return a new ObjectEntry[count] with nulls padding the unavailable entries.
count
- The count of next entries to be returned
SnapinException
- Thrown by the service provider when an error occurs.public ObjectEntry[] getPrev(int count) throws SnapinException
Gets entries toward the left (start) of the enumeration, as indicated by the count, and moves the current enumeration cursor position toward the left of the enumeration.
The movement rules are as follows:
The starting index refers to the implementation index before the getPrev() was executed. The ending index refers to the implementation index after the getPrev() is executed. A returned entry is an entry that is a member of the array returned from getPrev().
Always return an ObjectEntry[] with the correct number of entries. Do not return a new ObjectEntry[count] with nulls padding the "unavailable" entries.
count
- The count of previous entries to be returned
SnapinException
- Thrown by the service provider when an error occurs.public int moveLeft(int count) throws SnapinException
Moves the cursor position toward the left (start) of the enumeration according to the count specified.
The movement rules are as follows:
The starting index refers to the implementation index before the moveRight() was executed. The "ending index" refers to the implementation index after the moveRight() is executed.
count
- The count of entries to move.
SnapinException
- Thrown by the service provider when an error occurs.public int moveRight(int count) throws SnapinException
Moves the cursor toward the right (end) of the enumeration according to the count specified.
The movement rules are as follows:
The starting index indicates the implementation index before the moveRight() was executed. The "ending index" means the implementation index after the moveRight() is executed.
count
- The count of entries to move.
SnapinException
- Thrown by the service provider when an error occurs.public int moveTo(int position) throws SnapinException
The returned enumeration cursor position is an approximate position in the enumeration as described in the comments for getCurrentPosition().
position
- The relative position based on percentage from 0-1000 where
1000 is 100%.
SnapinException
- Thrown by the service provider when an error occurs.getCurrentPosition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |