001/*
002 * (C) Copyright 2006-2010 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Bogdan Stefanescu
018 *     Thierry Delprat
019 */
020package org.nuxeo.apidoc.api;
021
022import java.io.IOException;
023import java.net.URL;
024import java.util.Collection;
025import java.util.List;
026
027import com.fasterxml.jackson.annotation.JsonBackReference;
028import com.fasterxml.jackson.annotation.JsonIdentityInfo;
029import com.fasterxml.jackson.annotation.JsonManagedReference;
030import com.fasterxml.jackson.annotation.ObjectIdGenerators;
031
032@JsonIdentityInfo(generator = ObjectIdGenerators.StringIdGenerator.class)
033public interface ComponentInfo extends NuxeoArtifact {
034
035    String TYPE_NAME = "NXComponent";
036
037    String PROP_COMPONENT_ID = "nxcomponent:componentId";
038
039    String PROP_COMPONENT_NAME = "nxcomponent:componentName";
040
041    String PROP_COMPONENT_CLASS = "nxcomponent:componentClass";
042
043    String PROP_BUILT_IN_DOC = "nxcomponent:builtInDocumentation";
044
045    String PROP_IS_XML = "nxcomponent:isXML";
046
047    String PROP_SERVICES = "nxcomponent:services";
048
049    String getName();
050
051    @JsonManagedReference("component")
052    BundleInfo getBundle();
053
054    @JsonBackReference("point")
055    Collection<ExtensionPointInfo> getExtensionPoints();
056
057    @JsonBackReference("extension")
058    Collection<ExtensionInfo> getExtensions();
059
060    ExtensionPointInfo getExtensionPoint(String name);
061
062    String getDocumentation();
063
064    String getDocumentationHtml();
065
066    List<String> getServiceNames();
067
068    List<ServiceInfo> getServices();
069
070    String getComponentClass();
071
072    boolean isXmlPureComponent();
073
074    URL getXmlFileUrl();
075
076    String getXmlFileName();
077
078    String getXmlFileContent() throws IOException;
079
080}