| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.ui.api.useraccess; |
| |
| import java.util.Collection; |
| import java.util.HashSet; |
| import java.util.Set; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * The Class APosition. |
| */ |
| public abstract class AbstractPosition extends AbstractOrgElement implements IPosition { |
| |
| /** The Constant serialVersionUID. */ |
| private static final long serialVersionUID = 8654353192167477349L; |
| |
| /** The role names. */ |
| private Set<String> roleNames = new HashSet<>(); |
| |
| /** The permission list. */ |
| private IPermissionList permissions; |
| |
| public void setRoles(Set<String> roles) { |
| this.roleNames = roles; |
| } |
| |
| /** |
| * Adds a role |
| * |
| * @param role |
| * the role |
| */ |
| public void addRole(String role) { |
| roleNames.add(role); |
| } |
| |
| /** |
| * Gets the roles. |
| * |
| * @return the roles |
| */ |
| public Collection<String> getRoles() { |
| return roleNames; |
| } |
| |
| @Override |
| public IPermissionList getPermissionList() { |
| return permissions; |
| } |
| |
| public void setPermissionList(IPermissionList permissions) { |
| this.permissions = permissions; |
| } |
| } |