/* Copyright 2006 - 2010 Under Dusken Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package no.dusken.aranea.service; import no.dusken.aranea.model.Person; import no.dusken.aranea.model.Role; import no.dusken.common.service.GenericService; import java.util.List; /** * Role service */ public interface RoleService extends GenericService<Role> { /** * Gets all roles * * @return roles, ordered by ordering */ public List<Role> getRoles(); /** * Gets the roles a person has * * @param p is the person to get roles by * @return roles if found */ public List<Role> getRoles(Person p); /** * Gets the role with the given name * @param name - name of the role * @return - a role with the name or null if not found */ public Role getRolesByName(String name); }