This project has retired. For details please refer to its Attic page.
Action xref
View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.chemistry.opencmis.commons.enums;
20  
21  public enum Action {
22  
23      // important: do not change the order of these values!
24      /** @cmis 1.0 */
25      CAN_DELETE_OBJECT("canDeleteObject"), //
26      /** @cmis 1.0 */
27      CAN_UPDATE_PROPERTIES("canUpdateProperties"), //
28      /** @cmis 1.0 */
29      CAN_GET_FOLDER_TREE("canGetFolderTree"), //
30      /** @cmis 1.0 */
31      CAN_GET_PROPERTIES("canGetProperties"), //
32      /** @cmis 1.0 */
33      CAN_GET_OBJECT_RELATIONSHIPS("canGetObjectRelationships"), //
34      /** @cmis 1.0 */
35      CAN_GET_OBJECT_PARENTS("canGetObjectParents"), //
36      /** @cmis 1.0 */
37      CAN_GET_FOLDER_PARENT("canGetFolderParent"), //
38      /** @cmis 1.0 */
39      CAN_GET_DESCENDANTS("canGetDescendants"), //
40      /** @cmis 1.0 */
41      CAN_MOVE_OBJECT("canMoveObject"), //
42      /** @cmis 1.0 */
43      CAN_DELETE_CONTENT_STREAM("canDeleteContentStream"), //
44      /** @cmis 1.0 */
45      CAN_CHECK_OUT("canCheckOut"), //
46      /** @cmis 1.0 */
47      CAN_CANCEL_CHECK_OUT("canCancelCheckOut"), //
48      /** @cmis 1.0 */
49      CAN_CHECK_IN("canCheckIn"), //
50      /** @cmis 1.0 */
51      CAN_SET_CONTENT_STREAM("canSetContentStream"), //
52      /** @cmis 1.0 */
53      CAN_GET_ALL_VERSIONS("canGetAllVersions"), //
54      /** @cmis 1.0 */
55      CAN_ADD_OBJECT_TO_FOLDER("canAddObjectToFolder"), //
56      /** @cmis 1.0 */
57      CAN_REMOVE_OBJECT_FROM_FOLDER("canRemoveObjectFromFolder"), //
58      /** @cmis 1.0 */
59      CAN_GET_CONTENT_STREAM("canGetContentStream"), //
60      /** @cmis 1.0 */
61      CAN_APPLY_POLICY("canApplyPolicy"), //
62      /** @cmis 1.0 */
63      CAN_GET_APPLIED_POLICIES("canGetAppliedPolicies"), //
64      /** @cmis 1.0 */
65      CAN_REMOVE_POLICY("canRemovePolicy"), //
66      /** @cmis 1.0 */
67      CAN_GET_CHILDREN("canGetChildren"), //
68      /** @cmis 1.0 */
69      CAN_CREATE_DOCUMENT("canCreateDocument"), //
70      /** @cmis 1.0 */
71      CAN_CREATE_FOLDER("canCreateFolder"), //
72      /** @cmis 1.0 */
73      CAN_CREATE_RELATIONSHIP("canCreateRelationship"), //
74      /** @cmis 1.1 */
75      CAN_CREATE_ITEM("canCreateItem"), //
76      /** @cmis 1.0 */
77      CAN_DELETE_TREE("canDeleteTree"), //
78      /** @cmis 1.0 */
79      CAN_GET_RENDITIONS("canGetRenditions"), //
80      /** @cmis 1.0 */
81      CAN_GET_ACL("canGetACL"), //
82      /** @cmis 1.0 */
83      CAN_APPLY_ACL("canApplyACL");
84  
85      private final String value;
86  
87      Action(String v) {
88          value = v;
89      }
90  
91      public String value() {
92          return value;
93      }
94  
95      public static Action fromValue(String v) {
96          for (Action c : Action.values()) {
97              if (c.value.equals(v)) {
98                  return c;
99              }
100         }
101         throw new IllegalArgumentException(v);
102     }
103 }