| /******************************************************************************* |
| * Copyright (c) 2005 IBM Corporation and others. |
| * 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: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.wtp.releng.tools.component.dependency; |
| |
| import java.util.ArrayList; |
| import java.util.List; |
| |
| public class Plugin |
| { |
| String id; |
| List requires; |
| List dependents; |
| |
| public String getId() |
| { |
| return id; |
| } |
| public void setId(String id) |
| { |
| this.id = id; |
| } |
| |
| public void addRequire(Plugin plugin) |
| { |
| if (requires == null) |
| requires = new ArrayList(); |
| requires.add(plugin); |
| } |
| |
| public List getRequires() |
| { |
| if (requires != null) |
| return new ArrayList(requires); |
| else |
| return new ArrayList(0); |
| } |
| |
| public void addDependent(Plugin plugin) |
| { |
| if (dependents == null) |
| dependents = new ArrayList(); |
| dependents.add(plugin); |
| } |
| |
| public List getDependents() |
| { |
| if (dependents != null) |
| return new ArrayList(dependents); |
| else |
| return new ArrayList(0); |
| } |
| } |