001/*
002 * Copyright 2013 Box, Inc. All rights reserved.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.nuxeo.box.api.marshalling.dao;
017
018/**
019 * When inviting a user as a collaborator you specify the level of access that user has to your files. This class
020 * defines the permission levels. There are two groups of permission levels. One is available to everyone. The other is
021 * available only to business and enterprise users. For the latter group of permission, they must be enabled by the
022 * admin in the 'User Collaboration Settings' tab in "Admin Settings" from the "Admin Console". If any one of the
023 * permission levels is not available for you to choose, then your admin has most likely disabled this access level for
024 * the Enterprise account
025 */
026public class BoxCollaborationRole {
027
028    /**
029     * An Editor has full read/ write access to a folder. This is available to everyone. They can view and download the
030     * contents of the folder, as well as upload new content into the folder. They have permission to delete items, edit
031     * items, comment of files, generate a shared link for items in the folder, and create tags. By default an Editor
032     * will be able to invite new collaborators to a folder, however an editor cannot manage users currently existing in
033     * the folder.
034     */
035    public static final String EDITOR = "editor";
036
037    /**
038     * A Viewer has full read access to a folder. This is available to everyone. So they will be able to preview any
039     * item using the integrated content viewer, and will be able to download any item in the folder. A Viewer can
040     * generate a shared link for any item in the folder as well as make comments on items. A viewer will not be able to
041     * add tags, invite new collaborators, upload, or edit items in the folder.
042     */
043    public static final String VIEWER = "viewer";
044
045    /**
046     * A Previewer only has limited read access. This is only available for business and enterprise users. This
047     * permission level allows a user to view the items in the folder using the integrated content viewer or a viewing
048     * application from the OpenBox directory such as Scribd. They will have no other access to the files and will not
049     * be able to download, edit, or upload into the folder.
050     */
051    public static final String PREVIEWER = "previewer";
052
053    /**
054     * An Uploader is the most limited access that a user can have in a folder and provides limited write access. This
055     * is only available for business and enterprise users.A user assigned uploader will see the items in a folder but
056     * will not be able to download or view the items. The only action available will be to upload content into the
057     * folder. If an Uploader uploads an item with the same name as an existing item in the folder, the file will be
058     * updated and the existing version will be moved into the version history.
059     */
060    public static final String UPLOADER = "uploader";
061
062    /**
063     * This access level is a combination of Previewer and Uploader. This is only available for business and enterprise
064     * users.A user with this access level will be able to preview files in the folder using the integrated content
065     * viewer or a viewing application from the OpenBox directory such as Scribd and will also be able to upload items
066     * into the folder. If a Previewer-Uploader uploads an item with the same name as an existing item in the folder,
067     * the file will be updated and the existing version will be moved into the version history. They will have no other
068     * access to the files and will not be able to download or edit items in the folder.
069     */
070    public static final String PREVIEWER_UPLOADER = "previewer-uploader";
071
072    /**
073     * This access level is a combination of Viewer and Uploader. This is only available for business and enterprise
074     * users.A Viewer-Uploader has full read access to a folder and limited write access. They will be able to preview
075     * any item using the integrated content viewer, and will be able to download any item in the folder. They can
076     * generate a shared link for any item in the folder as well as make comments on items. A Viewer-Uploader will also
077     * be able to upload content into the folder. If a Viewer-Uploader uploads an item with the same name as an existing
078     * item in the folder, the file will be updated and the existing version will be moved into the version history.
079     * They will not be able to add tags, invite new collaborators, or edit items in the folder.
080     */
081    public static final String VIEWER_UPLOADER = "viewer-uploader";
082
083    /**
084     * A Co-Owner has all of the functional read/ write access that an Editor does. This is only available for business
085     * and enterprise users.This permission level has the added ability of being able to manage users in the folder. A
086     * Co-Owner can add new collaborators, change collaborators access, and remove collaborators (they will not be able
087     * to manipulate the owner of the folder or transfer ownership to another user).
088     */
089    public static final String CO_OWNER = "co-owner";
090}