001/*
002 * The MIT License
003 * Copyright (c) 2012 Microsoft Corporation
004 *
005 * Permission is hereby granted, free of charge, to any person obtaining a copy
006 * of this software and associated documentation files (the "Software"), to deal
007 * in the Software without restriction, including without limitation the rights
008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
009 * copies of the Software, and to permit persons to whom the Software is
010 * furnished to do so, subject to the following conditions:
011 *
012 * The above copyright notice and this permission notice shall be included in
013 * all copies or substantial portions of the Software.
014 *
015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
021 * THE SOFTWARE.
022 */
023
024package microsoft.exchange.webservices.data.core.enumeration.service;
025
026/**
027 * Defines the effective user rights associated with an item or folder.
028 */
029public enum EffectiveRights {
030
031  // The user has no acces right on the item or folder.
032  /**
033   * The None.
034   */
035  None(0),
036
037  // The user can create associated item (FAI)
038  /**
039   * The Create associated.
040   */
041  CreateAssociated(1),
042
043  // The user can create item.
044  /**
045   * The Create contents.
046   */
047  CreateContents(2),
048
049  // The user can create sub-folder.
050
051  /**
052   * The Create hierarchy.
053   */
054  CreateHierarchy(4),
055
056  // The user can delete item and/or folder.
057  /**
058   * The Delete.
059   */
060  Delete(8),
061
062  // The user can modify the property of item and/or folder.
063  /**
064   * The Modify.
065   */
066  Modify(16),
067
068  // The user can read the contents of item.
069  /**
070   * The Read.
071   */
072  Read(32),
073
074  /// The user can view private item.
075  /**
076   * The View Private Items.
077   */
078  ViewPrivateItems(64);
079
080
081  /**
082   * The effective rights.
083   */
084  private final int effectiveRights;
085
086  /**
087   * Instantiates a new effective rights.
088   *
089   * @param effectiveRights the effective rights
090   */
091  EffectiveRights(int effectiveRights) {
092    this.effectiveRights = effectiveRights;
093  }
094
095}