001: /*****************************************************************************
002: * Java Plug-in Framework (JPF)
003: * Copyright (C) 2006-2007 Dmitry Olshansky
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2.1 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: *****************************************************************************/package org.java.plugin.tools.mocks;
019:
020: import org.java.plugin.registry.Documentation;
021: import org.java.plugin.registry.PluginDescriptor;
022: import org.java.plugin.registry.PluginElement;
023: import org.java.plugin.registry.PluginFragment;
024:
025: /**
026: * @version $Id$
027: * @param <T> plug-in element owner type
028: */
029: public abstract class MockPluginElement<T extends PluginElement<T>>
030: extends MockIdentity implements PluginElement<T> {
031: private PluginDescriptor declaringPluginDescriptor;
032: private PluginFragment declaringPluginFragment;
033: private String docsPath;
034: private Documentation<T> documentation;
035:
036: /**
037: * @see org.java.plugin.registry.PluginElement#getDeclaringPluginDescriptor()
038: */
039: public PluginDescriptor getDeclaringPluginDescriptor() {
040: return declaringPluginDescriptor;
041: }
042:
043: /**
044: * @param value the declaring plug-in descriptor to set
045: * @return this instance
046: */
047: public MockPluginElement<T> setDeclaringPluginDescriptor(
048: final PluginDescriptor value) {
049: declaringPluginDescriptor = value;
050: return this ;
051: }
052:
053: /**
054: * @see org.java.plugin.registry.PluginElement#getDeclaringPluginFragment()
055: */
056: public PluginFragment getDeclaringPluginFragment() {
057: return declaringPluginFragment;
058: }
059:
060: /**
061: * @param value the declaring plug-in fragment to set
062: * @return this instance
063: */
064: public MockPluginElement<T> setDeclaringPluginFragment(
065: final PluginFragment value) {
066: declaringPluginFragment = value;
067: return this ;
068: }
069:
070: /**
071: * @see org.java.plugin.registry.Documentable#getDocsPath()
072: */
073: public String getDocsPath() {
074: return docsPath;
075: }
076:
077: /**
078: * @param value the docs path to set
079: * @return this instance
080: */
081: public MockPluginElement<T> setDocsPath(final String value) {
082: docsPath = value;
083: return this ;
084: }
085:
086: /**
087: * @see org.java.plugin.registry.Documentable#getDocumentation()
088: */
089: public Documentation<T> getDocumentation() {
090: return documentation;
091: }
092:
093: /**
094: * @param value the documentation to set
095: * @return this instance
096: */
097: public MockPluginElement<T> setDocumentation(
098: final Documentation<T> value) {
099: documentation = value;
100: return this;
101: }
102: }
|