| /** |
| * |
| * 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 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.ui.api.useraccess; |
| |
| |
| /** |
| * The Class APosition. |
| */ |
| public abstract class AbstractOrgElement implements IOrgElement { |
| |
| /** The Constant serialVersionUID. */ |
| private static final long serialVersionUID = 8654353192167477349L; |
| |
| /** The root node. */ |
| private IOrgElement rootNode; |
| |
| /** The organization the node belongs to. */ |
| private ISubOrganization organization; |
| |
| /** The super ordinate. */ |
| private IOrgElement superOrdinate = null; |
| |
| /** The name of the node. */ |
| private String name; |
| |
| /** The link alias. */ |
| private String linkAlias; |
| |
| public IOrgElement getSuperOrdinate() { |
| return superOrdinate; |
| } |
| |
| public void setSuperOrdinate(IOrgElement superOrdinate) { |
| this.superOrdinate = superOrdinate; |
| } |
| |
| public void setRootNode(IOrgElement rootNode) { |
| this.rootNode = rootNode; |
| } |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see org.eclipse.osbp.authentication.provider.IOrgNode#getName() |
| */ |
| @Override |
| public String getName() { |
| return name; |
| } |
| |
| public void setName(String name) { |
| this.name = name; |
| } |
| |
| @Override |
| public String getLinkAlias() { |
| return linkAlias; |
| } |
| |
| public void setLinkAlias(String linkAlias) { |
| this.linkAlias = linkAlias; |
| } |
| |
| |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see org.eclipse.osbp.authentication.provider.IOrgNode#hasSuperior() |
| */ |
| @Override |
| public boolean hasSuperior() { |
| return superOrdinate != null; |
| } |
| |
| /** |
| * Gets the superior org node. |
| * |
| * @return the superior org node |
| */ |
| public IOrgElement getSuperiorOrgNode() { |
| return superOrdinate; |
| } |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see org.eclipse.osbp.authentication.provider.IOrgNode#getSuperior() |
| */ |
| @Override |
| public String getSuperior() { |
| return superOrdinate == null ? null : superOrdinate.getName(); |
| } |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see org.eclipse.osbp.authentication.provider.IOrgNode#hasRootNode() |
| */ |
| @Override |
| public boolean hasRootNode() { |
| return superOrdinate != null; |
| } |
| |
| /** |
| * Gets the root node org node. |
| * |
| * @return the root node org node |
| */ |
| public IOrgElement getRootNodeOrgNode() { |
| return rootNode; |
| } |
| |
| /* |
| * (non-Javadoc) |
| * |
| * @see org.eclipse.osbp.authentication.provider.IOrgNode#getRootNode() |
| */ |
| @Override |
| public String getRootNode() { |
| return rootNode == null ? null : rootNode.getName(); |
| } |
| |
| @Override |
| public ISubOrganization getOrganization() { |
| return organization; |
| } |
| |
| public void setOrganization(ISubOrganization organization) { |
| this.organization = organization; |
| } |
| |
| } |