public class ServerInfo extends Object
ServerInfo object using the method build(String, String).
 Example
ServerInfo info = ServerInfo.build();The server name and version will be fetched form the runtime properties:
org.nuxeo.ecm.product.name and
 org.nuxeo.ecm.product.version If you ant to use another name and version just call
 build(String, String) instead to build your server information.
 
 After building a ServerInfo object you can start browsing the bundles deployed on the server by calling
 getBundles() or fetch a specific bundle given its symbolic name getBundle(String).
 
 To write down the server information as XML use toXML(Writer) and to read it back use
 fromXML(Reader).
 
Example:
 ServerInfo info = ServerInfo.build();
 BundleInfo binfo =info.getBundle("org.nuxeo.runtime");
 System.out.println("Bundle Id: "+binfo.getBundleId());
 System.out.println("File Name: "+binfo.getFileName());
 System.out.println("Manifest: "+ binfo.getManifest());
 for (ComponentInfo cinfo : binfo.getComponents()) {
   System.out.println("Component: "+cinfo.getName());
   System.out.println(cinfo.getDocumentation());
   // find extension points provided by this component
   for (ExtensionPointInfo xpi : cinfo.getExtensionPoints()) {
     System.out.println("Extension point: "+xpi.getName());
     System.out.println("Accepted contribution classes: "+Arrays.asList(xpi.getTypes()));
     // find contributed extensions to this extension point:
   }
   // find contribution provided by this component
   for (ExtensionInfo xi : cinfo.getExtensions()) {
      System.out.println("Extension: "+xi.getId()+" to "+xi.getExtensionPoint());
      System.out.println(xi.getDocumentation());
      ...
   }
 }
 | Modifier and Type | Field and Description | 
|---|---|
static String | 
META_INF_MANIFEST_MF  | 
static String | 
POM_PROPERTIES  | 
static String | 
POM_XML  | 
| Constructor and Description | 
|---|
ServerInfo(String name,
          String version)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addBundle(BundleInfoImpl bundle)  | 
void | 
addBundle(Collection<BundleInfoImpl> bundles)  | 
static ServerInfo | 
build()  | 
static ServerInfo | 
build(String name,
     String version)  | 
static ServerInfo | 
fromXML(File file)  | 
static ServerInfo | 
fromXML(Reader reader)  | 
List<Class<?>> | 
getAllSpi()  | 
BundleInfoImpl | 
getBundle(String id)  | 
Collection<BundleInfoImpl> | 
getBundles()  | 
String | 
getName()  | 
String | 
getVersion()  | 
void | 
toXML(Writer writer)  | 
public static final String META_INF_MANIFEST_MF
public static final String POM_XML
public static final String POM_PROPERTIES
public String getName()
public String getVersion()
public Collection<BundleInfoImpl> getBundles()
public void addBundle(BundleInfoImpl bundle)
public void addBundle(Collection<BundleInfoImpl> bundles)
public BundleInfoImpl getBundle(String id)
public static ServerInfo build()
public static ServerInfo build(String name, String version)
public void toXML(Writer writer) throws IOException
IOExceptionpublic static ServerInfo fromXML(File file) throws IOException
IOExceptionpublic static ServerInfo fromXML(Reader reader)
Copyright © 2015 Nuxeo SA. All rights reserved.