1 /** 2 * Copyright 2005-2013 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.rice.kim.api.permission; 17 18 19 import org.kuali.rice.core.api.mo.common.GloballyUnique; 20 import org.kuali.rice.core.api.mo.common.Identifiable; 21 import org.kuali.rice.core.api.mo.common.Versioned; 22 import org.kuali.rice.core.api.mo.common.active.Inactivatable; 23 import org.kuali.rice.kim.api.common.template.TemplateContract; 24 25 import java.util.Map; 26 27 /** 28 * This is the contract for a Permission. Represents a single permission within the system. 29 * 30 * Permissions are attached to roles. All authorization checks should be done against permissions, 31 * never against roles or groups. 32 * 33 */ 34 public interface PermissionContract extends Versioned, GloballyUnique, Inactivatable, Identifiable { 35 36 /** 37 * The namespace code that this Permission belongs too. 38 * 39 * @return namespaceCode 40 */ 41 String getNamespaceCode(); 42 43 /** 44 * The name of the Permission. 45 * 46 * @return name 47 */ 48 String getName(); 49 50 /** 51 * The description of the Permission. 52 * 53 * @return description 54 */ 55 String getDescription(); 56 57 /** 58 * The Template referenced by the Permission. 59 * 60 * @return templateId 61 */ 62 TemplateContract getTemplate(); 63 64 /** 65 * Attributes for a Permission. 66 * 67 * @return attributes 68 */ 69 Map<String, String> getAttributes(); 70 }