ReadRangeMask1 (NotesCalendar - JavaScript)

Read-write. Mask that controls the property display for a readRange operation.

Defined in

NotesCalendar

Syntax

getReadRangeMask1() : int

setReadRangeMask1(mask:int) : void

Usage

Before calling readRange, set this mask to designate the properties that you want returned. By default, all properties are returned.
The following table specifies the bit values. Combine values by adding them.
Table 1. Bit values for ReadRangeMask1
Constant name Numerical value
NotesCalendar.CS_READ_RANGE_MASK_ALARM 131072
NotesCalendar.CS_READ_RANGE_MASK_APPTTYPE 2048
NotesCalendar.CS_READ_RANGE_MASK_CATEGORY 1024
NotesCalendar.CS_READ_RANGE_MASK_CLASS 16
NotesCalendar.CS_READ_RANGE_MASK_DTEND 2
NotesCalendar.CS_READ_RANGE_MASK_DTSTAMP 4
NotesCalendar.CS_READ_RANGE_MASK_DTSTART 1
NotesCalendar.CS_READ_RANGE_MASK_LOCATION 256
NotesCalendar.CS_READ_RANGE_MASK_NOTESORGANIZER 32768
NotesCalendar.CS_READ_RANGE_MASK_NOTESROOM 65536
NotesCalendar.CS_READ_RANGE_MASK_NOTICETYPE 4096
NotesCalendar.CS_READ_RANGE_MASK_ONLINE_URL 16384
NotesCalendar.CS_READ_RANGE_MASK_PRIORITY 32
NotesCalendar.CS_READ_RANGE_MASK_RECURRENCE_ID 64
NotesCalendar.CS_READ_RANGE_MASK_SEQUENCE 128
NotesCalendar.CS_READ_RANGE_MASK_STATUS 8192
NotesCalendar.CS_READ_RANGE_MASK_SUMMARY 8
NotesCalendar.CS_READ_RANGE_MASK_TRANSP 512

Examples

This button event gets limited calendar and scheduling information for the current user for today and tomorrow.
var dbdir:NotesDbDirectory = session.getDbDirectory("");
var maildb:NotesDatabase = dbdir.openMailDatabase();
var cal:NotesCalendar = session.getCalendar(maildb);
var dt1:NotesDateTime = session.createDateTime("Today 08");
var dt2:NotesDateTime = session.createDateTime("Tomorrow 17");
var entries:java.util.Vector = cal.getEntries(dt1, dt2);
var mask1:int = NotesCalendar.CS_READ_RANGE_MASK_SUMMARY +
	NotesCalendar.CS_READ_RANGE_MASK_STATUS +
	NotesCalendar.CS_READ_RANGE_MASK_NOTICETYPE;
cal.setReadRangeMask1(mask1);
requestScope.status = cal.readRange(dt1, dt2);

LotusScript® syntax and examples

NotesCalendar.ReadRangeMask1 As Long
This agent gets limited calendar and scheduling information for the current user for today and tomorrow.
Sub Initialize
	Dim session As New NotesSession
	Dim maildb As New NotesDatabase("", "")
	Dim cal As NotesCalendar
	Dim dt1 As NotesDateTime
	Dim dt2 As NotesDateTime
	Dim calstr As String
	Dim db As NotesDatabase
	Dim doc As NotesDocument
	Dim body As NotesRichTextItem
	REM Get calendar for current user
	Call maildb.Openmail()
	Set cal = session.getCalendar(maildb)
	Set dt1 = session.createdatetime("Today 08")
	Set dt2 = session.Createdatetime("Tomorrow 17")
	REM Create document to post results
	Set db = session.CurrentDatabase
	Set doc = db.CreateDocument
	doc.Form = "main"
	doc.Subject = "Today and tomorrow"
	Set body = doc.Createrichtextitem("body")
	REM Read and put in body of document
	cal.Readrangemask1 = Cs_read_range_mask_summary + Cs_read_range_mask_status + _
	Cs_read_range_mask_noticetype
	calstr = cal.Readrange(dt1, dt2)
	Call body.Appendtext(calstr)
	Call doc.Save( True, True )
End Sub

Java syntax and examples

int NotesCalendar.getReadRangeMask1()
void NotesCalendar.setReadRangeMask1(int mask)
This agent gets limited calendar and scheduling information for the current user for today and tomorrow.
import lotus.domino.*;

public class JavaAgent extends AgentBase {

    public void NotesMain() {

      try {
          Session session = getSession();
          AgentContext agentContext = session.getAgentContext();

          // (Your code goes here)
          DbDirectory dbdir = session.getDbDirectory("");
          Database maildb = dbdir.openMailDatabase();
          NotesCalendar cal = session.getCalendar(maildb);
          DateTime dt1 = session.createDateTime("Today 08");
          DateTime dt2 = session.createDateTime("Tomorrow 17");
          int mask1 = NotesCalendar.CS_READ_RANGE_MASK_SUMMARY +
          	NotesCalendar.CS_READ_RANGE_MASK_STATUS +
          	NotesCalendar.CS_READ_RANGE_MASK_NOTICETYPE;
          cal.setReadRangeMask1(mask1);
          String calstr = cal.readRange(dt1, dt2);
          
          // Write result to document
          Database db = agentContext.getCurrentDatabase();
          Document doc = db.createDocument();
          doc.appendItemValue("Form", "main");
          doc.appendItemValue("subject", "Calendar entry");
          RichTextItem body = doc.createRichTextItem("body");
          body.appendText(calstr);
          doc.save(true, true);

      } catch(Exception e) {
          e.printStackTrace();
       }
   }
}