Package tigase.server
Class ComponentInfo
java.lang.Object
tigase.server.ComponentInfo
Helper class for storing and handling additional informations about components
- Author:
- Wojciech Kapcia
-
Constructor Summary
ConstructorDescriptionComponentInfo
(Class<?> c) Creates ComponentInfo object with initial dataComponentInfo
(String cmpName, Class<?> c) Creates ComponentInfo object with initial dataComponentInfo
(String cmpTitle, String cmpVersion, String cmpCls) Creates ComponentInfo object with initial dataComponentInfo
(String cmpName, String cmpTitle, String cmpVersion, String cmpCls) Creates ComponentInfo object with initial dataComponentInfo
(String cmpName, String cmpTitle, String cmpVersion, String cmpCls, HashMap<String, Object> cmpData) Creates ComponentInfo object with initial data -
Method Summary
Modifier and TypeMethodDescriptionAllows retrieving of component's classAllows retrieving of component's additional dataAllows retrieving of component's titleAllows retrieving of component's versionstatic Package
getImplementation
(Class<?> c) Allows retrieving implementation package (obtained from jar package) for a given classstatic String
getImplementationInfo
(Class<?> c) Allows retrieving implementation information (obtained from jar package) for a given classstatic String
getImplementationTitle
(Class<?> c) Allows retrieving implementation title (obtained from jar package) for a given classstatic String
Allows retrieving implementation version (obtained from jar package) for a given classgetImplementationVersion
(String... classes) getName()
Allows retrieving of component's namestatic Optional<ComponentInfo>
Allows retrieving of component's information as ElementtoString()
-
Constructor Details
-
ComponentInfo
Creates ComponentInfo object with initial data- Parameters:
cmpTitle
- title of the componentcmpVersion
- version of the componentcmpCls
- class of the component
-
ComponentInfo
Creates ComponentInfo object with initial data- Parameters:
cmpName
- name of the componentcmpTitle
- title of the componentcmpVersion
- version of the componentcmpCls
- class of the component
-
ComponentInfo
public ComponentInfo(String cmpName, String cmpTitle, String cmpVersion, String cmpCls, HashMap<String, Object> cmpData) Creates ComponentInfo object with initial data- Parameters:
cmpName
- name of the componentcmpTitle
- title of the componentcmpVersion
- version of the componentcmpCls
- class of the componentcmpData
- additional information about component
-
ComponentInfo
Creates ComponentInfo object with initial data- Parameters:
c
- class of the component
-
ComponentInfo
Creates ComponentInfo object with initial data- Parameters:
cmpName
- name of the componentc
- class of the component
-
-
Method Details
-
getImplementation
Allows retrieving implementation package (obtained from jar package) for a given class- Parameters:
c
- class for which package is to be retrieved- Returns:
- package containing given class
-
getImplementationInfo
Allows retrieving implementation information (obtained from jar package) for a given class- Parameters:
c
- class for which Package information is to be retrieved- Returns:
- title and version of the Package holding class
-
getImplementationTitle
Allows retrieving implementation title (obtained from jar package) for a given class- Parameters:
c
- class for which Package title is to be retrieved- Returns:
- Package title of the given class
-
getImplementationVersion
-
getImplementationVersion
Allows retrieving implementation version (obtained from jar package) for a given class- Parameters:
c
- class for which Package version is to be retrieved- Returns:
- Package version of the given class
-
of
-
getName
Allows retrieving of component's name- Returns:
- component name
-
getComponentTitle
Allows retrieving of component's title- Returns:
- component title
-
getComponentVersion
Allows retrieving of component's version- Returns:
- component version
-
getComponentClass
Allows retrieving of component's class- Returns:
- component class
-
getComponentData
Allows retrieving of component's additional data- Returns:
- component additional data
-
toString
-
toElement
Allows retrieving of component's information as Element- Returns:
- component information as Element
-