com.hcl.domino.calendar.CalendarRead Maven / Gradle / Ivy
/*
* ==========================================================================
* Copyright (C) 2019-2022 HCL America, Inc. ( http://www.hcl.com/ )
* All rights reserved.
* ==========================================================================
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. You may obtain a
* copy of the License at .
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
* ==========================================================================
*/
package com.hcl.domino.calendar;
import java.util.Collection;
import com.hcl.domino.data.Database;
/**
* Flags that control behavior of the calendar APIs that return iCalendar data
* for an entry or notice
* Note: The values of these constants are the very same constants used by the
* C-API.
*
* @author Karsten Lehmann
*/
public enum CalendarRead {
/**
* Used when APIs generate iCalendar
*
* By default, some X-LOTUS properties and parameters will be included in
* iCalendar data
* returned by these APIs.
* {@link #HIDE_X_LOTUS} causes all X-LOTUS properties and parameters to be
* removed from
* the generated iCalendar data.
*
* Note: This overrides {@link #INCLUDE_X_LOTUS}
*/
HIDE_X_LOTUS(0x00000001),
/**
* Used when APIs generate iCalendar
*
* Include all Lotus specific properties like X-LOTUS-UPDATE-SEQ,
* X-LOTUS-UPDATE_WISL, etc
* in the generated iCalendar data.
* These properties are NOT included by default in any iCalendar data returned
* by the APIs.
*
* Caution: Unless the caller knows how to use these it can be dangerous since
* their
* presence will be honored and can cause issues if not updated properly.
* Ignored if {@link #HIDE_X_LOTUS} is also specified.
*/
INCLUDE_X_LOTUS(0x00000002),
/**
* RESERVED: This functionality is not currently in plan
* When generating ATTENDEE info in
* {@link Calendaring#readCalendarEntry(Database, String, String, Collection)},
* determine and populate response Status (which might be a performance hit)
*/
SKIP_RESPONSE_DATA(0x00000004);
public static int toBitMask(final Collection findSet) {
int result = 0;
if (findSet != null) {
for (final CalendarRead currFind : CalendarRead.values()) {
if (findSet.contains(currFind)) {
result = result | currFind.getValue();
}
}
}
return result;
}
private int m_val;
CalendarRead(final int val) {
this.m_val = val;
}
public int getValue() {
return this.m_val;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy