Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

com.lotus.cs
Class ViewInfo

java.lang.Object
  extended bycom.lotus.cs.ViewInfo

public class ViewInfo
extends java.lang.Object

A ViewInfo object is the first object to create in order to retrieve data from a Domino view (for all types of views including calendar views). A ViewInfo contains information about a Domino view, including view columns, rows, categories, and calendar days (where appropriate). To create a ViewInfo object, use DominoService.getViewInfo() with the names of the database and view specified. For example,
ViewInfo vi = ds.getViewInfo("testmail.nsf", "($all)");
(where ds is a DominoService object)

See Also:
DominoService.getViewInfo(java.lang.String, java.lang.String), ColumnInfo, RowInfo, CalendarDayInfo

Field Summary
static int DOMINO_46
          Domino version (returned by ViewInfo.getVersion)
static int DOMINO_5PLUS
          Domino version (returned by ViewInfo.getVersion)
static int ONE_DAY
          Calendar grid value (used with ViewInfo.getCalendarDayInfo)
static int ONE_MONTH
          Calendar grid value (used with ViewInfo.getCalendarDayInfo)
static int ONE_WEEK
          Calendar grid value (used with ViewInfo.getCalendarDayInfo)
static int TWO_DAYS
          Calendar grid value (used with ViewInfo.getCalendarDayInfo)
static int TWO_WEEKS
          Calendar grid value (used with ViewInfo.getCalendarDayInfo)
 

Method Summary
 CalendarDayInfo[] getCalendarDayInfo(java.lang.String ISOdate, int grid)
          Returns the calendar data, for a specified period of time, relative to a specified ISO standard (yyyy-mm-dd) date.
 ColumnInfo[] getColumnInfo()
          Returns column information about a view, encapsulated in an array of objects of type ColumnInfo.
 java.lang.String getProtocol()
          Returns "http" or "https", depending on whether SSL is enabled for the data source.
 RowInfo[] getRowInfo(java.lang.String startPosition, int count)
          Returns row information about a view, encapsulated in an array of objects of type RowInfo.
 int getVersion()
          Returns the Domino version (simplified) of the data source server.
 java.lang.String[] getViewCategories()
          Returns the list of categories in a specified view.
 int isCalendarView()
          Returns 1 if the view is a calendar view, 0 if the view is not a calendar view, and -1 if this information can not be determined.
 void setPreformat(boolean usePreformat)
          Used to contol if values are to be preformatted.
 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOMINO_46

public static final int DOMINO_46
Domino version (returned by ViewInfo.getVersion)

See Also:
Constant Field Values

DOMINO_5PLUS

public static final int DOMINO_5PLUS
Domino version (returned by ViewInfo.getVersion)

See Also:
Constant Field Values

ONE_DAY

public static final int ONE_DAY
Calendar grid value (used with ViewInfo.getCalendarDayInfo)

See Also:
Constant Field Values

TWO_DAYS

public static final int TWO_DAYS
Calendar grid value (used with ViewInfo.getCalendarDayInfo)

See Also:
Constant Field Values

ONE_WEEK

public static final int ONE_WEEK
Calendar grid value (used with ViewInfo.getCalendarDayInfo)

See Also:
Constant Field Values

TWO_WEEKS

public static final int TWO_WEEKS
Calendar grid value (used with ViewInfo.getCalendarDayInfo)

See Also:
Constant Field Values

ONE_MONTH

public static final int ONE_MONTH
Calendar grid value (used with ViewInfo.getCalendarDayInfo)

See Also:
Constant Field Values

Method Detail

setPreformat

public void setPreformat(boolean usePreformat)
Used to contol if values are to be preformatted. For examle, if ISO8601 dates are preferred over mm/dd/yy dates set this flag to false.
 // get dates in the format 20030211T221636,18-05 instead of 02/11/2003 10:16:36 PM
 vi = dominoService.getViewInfo("xxx.nsf","h_View1");
 vi.setPreformat(true);
 RowInfo[] ri=vi.getRowInfo("1",100);
 

Parameters:
usePreformat - true if you want values to be preformatted(default), false(default) if not (get raw iso values)

getVersion

public int getVersion()
Returns the Domino version (simplified) of the data source server.

Returns:
a constant indicating the Domino version range of the data source server. For servers running 4.6, ViewInfo.DOMINO_46 is returned. For servers running R5.0 and up, ViewInfo.DOMINO_5PLUS is returned. If there was a problem (such as invalid credentials) determining the version, 0 is returned.

getProtocol

public java.lang.String getProtocol()
Returns "http" or "https", depending on whether SSL is enabled for the data source.


getViewCategories

public java.lang.String[] getViewCategories()
Returns the list of categories in a specified view. Only returns the top level categories.


isCalendarView

public int isCalendarView()
Returns 1 if the view is a calendar view, 0 if the view is not a calendar view, and -1 if this information can not be determined.


getColumnInfo

public ColumnInfo[] getColumnInfo()
Returns column information about a view, encapsulated in an array of objects of type ColumnInfo.

See Also:
ColumnInfo

getRowInfo

public RowInfo[] getRowInfo(java.lang.String startPosition,
                            int count)
Returns row information about a view, encapsulated in an array of objects of type RowInfo. To display the first page of rows, use startPosition 1. To display the next page of rows, determine the position of the last row on the current page (using RowInfo.getStartPosition) and use that startPosition (be careful to trim off this duplicate row from the RowInfo[] set when displaying). To know whether you have reached the last page of row data, check that the length of the last RowInfo[] retrieved is less than the count specified.

NOTE: There is no filter or sort support implemented.

Parameters:
startPosition - the position in the view to start from.
count - the number of rows to return.
See Also:
RowInfo

getCalendarDayInfo

public CalendarDayInfo[] getCalendarDayInfo(java.lang.String ISOdate,
                                            int grid)
Returns the calendar data, for a specified period of time, relative to a specified ISO standard (yyyy-mm-dd) date. The information returned for the time periods starting with ViewInfo.ONE_WEEK (and greater) start with the preceeding Monday and end with a Sunday. So, for example, if you ask for a Wednesday, example, 2002-04-17, with a grid of ViewInfo.TWO_WEEKS, the information returned with be from 2002-04-15 (the Monday) through the following Sunday, 2002-04-28.

Parameters:
ISOdate - the start date, in the ISO standard format, yyyy-mm-dd. Default is today's date (use null).
grid - amount of days to return: ViewInfo.ONE_DAY, ViewInfo.TWO_DAYS, ViewInfo.ONE_WEEK, ViewInfo.TWO_WEEKS, or ViewInfo.ONE_MONTH. If a value other than these is used, default is ViewInfo.ONE_WEEK. Note: Use these ViewInfo constants (rather than 1, 2, 7, etc.).
See Also:
CalendarDayInfo

Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.