001/*
002* file CcAccessControlEntry.java
003*
004* Licensed Materials - Property of IBM
005* Restricted Materials of IBM
006* 
007* com.ibm.rational.wvcm.stp.cc.CcAccessControlEntry
008*
009* (C) Copyright IBM Corporation 2012.  All Rights Reserved. 
010* Note to U.S. Government Users Restricted Rights:  Use, duplication or  
011* disclosure restricted by GSA ADP  Schedule Contract with IBM Corp. 
012*/
013package com.ibm.rational.wvcm.stp.cc;
014
015import javax.wvcm.WvcmException;
016
017/**
018 * <p>
019 * An access control entry provides a triple of a role kind, identity and permission set
020 * as part of an effective ACL for a VOB resource.
021 * <p>
022 * This interface provides an aggregate object for handling such an entry.
023 * </p>
024 */
025public interface CcAccessControlEntry {
026    
027    public enum PrincipalKind {
028        NONE("<id-kind-none>"),
029        USER("User"),
030        GROUP("Group"),
031        EVERYONE("Everyone"),
032        OWNER_USER("Owner-User"),
033        OWNER_GROUP("Owner-Group"),
034        ROLE("Role");
035        
036        private final String m_kind;
037
038        PrincipalKind(String kind) {
039            m_kind = kind;
040        }
041
042        public String toString() {
043            return m_kind;
044        }
045    }
046  
047    /**
048     * Get the kind of principal for which this entry applies.
049     */
050    public PrincipalKind getPrincipalKind();
051    
052    /**
053     * Get the principal name for the entry.  Includes domain name when applicable
054     */
055    public String getPrincipalName();
056    
057    /**
058     * Get the human readable permissions for this entry.
059     */
060    public String getPermissions() throws WvcmException;
061
062}