001/* 002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 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 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * 019 * $Id$ 020 */ 021 022package org.nuxeo.ecm.core.api; 023 024import java.io.Serializable; 025import java.util.List; 026 027/** 028 * Holds the list of member users and subgroups for a group. 029 * 030 * @author <a href="mailto:glefter@nuxeo.com">George Lefter</a> 031 */ 032public interface NuxeoGroup extends Serializable { 033 034 String PREFIX = "group:"; 035 036 /** 037 * Gets the list of member users of this group. 038 * 039 * @return the list of member users of this group 040 */ 041 List<String> getMemberUsers(); 042 043 /** 044 * Gets the list of member groups of this group. 045 * 046 * @return the list of member groups of this group 047 */ 048 List<String> getMemberGroups(); 049 050 /** 051 * Gets the list of groups this group is a member of. 052 * 053 * @return the list of parent groups of this group 054 */ 055 List<String> getParentGroups(); 056 057 /** 058 * Sets the list of member users for this group. 059 * 060 * @param users a list of users 061 */ 062 void setMemberUsers(List<String> users); 063 064 /** 065 * Sets the list of member groups for this group. 066 * 067 * @param groups a list of groups 068 */ 069 void setMemberGroups(List<String> groups); 070 071 /** 072 * Sets the list of groups this group is member of. 073 * 074 * @param groups a list of groups 075 */ 076 void setParentGroups(List<String> groups); 077 078 /** 079 * Gets the name of the group. 080 * 081 * @return the name of the group 082 */ 083 String getName(); 084 085 /** 086 * Sets the name of this group. 087 * 088 * @param name the new name of the group 089 */ 090 void setName(String name); 091 092 /** 093 * Gets the label of the group 094 * 095 * @return the label of the group 096 */ 097 String getLabel(); 098 099 /** 100 * Sets the label of this group. 101 * 102 * @param label the label of the group 103 */ 104 void setLabel(String label); 105 106 /** 107 * @since 9.3 108 */ 109 DocumentModel getModel(); 110 111}