diff options
Diffstat (limited to 'jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java')
-rw-r--r-- | jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java new file mode 100644 index 000000000..6acbf8eb3 --- /dev/null +++ b/jsf/tests/org.eclipse.jst.jsf.metadata.tests/src/org/eclipse/jst/jsf/metadata/tests/metadataprocessing/MetaDataEnabledBarkAdapter.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2006 Oracle Corporation. + * 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: + * Gerry Kessler/Oracle - initial API and implementation + * + ********************************************************************************/ +package org.eclipse.jst.jsf.metadata.tests.metadataprocessing; + +import java.util.List; + +import org.eclipse.jst.jsf.metadata.tests.metadataprocessing.features.IBarker; +import org.eclipse.jst.jsf.metadataprocessors.AbstractMetaDataEnabledFeature; +import org.eclipse.jst.jsf.metadataprocessors.features.IPossibleValues; + +/** + * Test class implementing existing and new fetaure type for + * testing the MetaDataEnabledFeature Extension + * + * @author Gerry Kessler - Oracle + * + */ +public class MetaDataEnabledBarkAdapter extends AbstractMetaDataEnabledFeature + implements + IBarker, IPossibleValues{ + + public MetaDataEnabledBarkAdapter() { + super(); + } + + public boolean canBark() { + return true; + } + + public List<?> getBarks() { + return getTraitValueAsListOfStrings("barks"); +// //notice that we want to use the bundle id of the extender +// return CMAnnotationHelper.getCMAttributePropertyValues(MetadataTestsPlugin.ID_BUNDLE, getCMAnnotationContext().getUri(), +// getCMAnnotationContext().getElementName(), getCMAnnotationContext().getAttributeName(), +// "barks"); + } + + public List<?> getPossibleValues() { + return getBarks(); + } + + +} |