Package com.ptc.customersupport.mbeans
Interface PluginMBean
- All Superinterfaces:
SelfEmailingMBean
- All Known Subinterfaces:
GatherFilePluginMBean,GatherFolderPluginMBean,GatherLogsPluginMBean,MultipleFilePluginMBean,QMLPluginMBean,SQLPluginMBean,WinDUPluginMBean,XconfPluginMBean
- All Known Implementing Classes:
AbstractMultipleFilePlugin,AbstractPlugin,AbstractQMLPlugin,AbstractReportingPlugin,AbstractSQLPlugin,AbstractWinDUPlugin,AbstractXconfPlugin,AgentIniPlugin,ApacheConfFolderPlugin,ApacheLogsPlugin,AuthPropertiesFilePlugin,CabinetBasedDataContainerAlignmentPlugin,CogstartupXmlPlugin,ContainerStructurePlugin,DatabaseIndexUtilityPlugin,DbPropertiesPlugin,DeclarationsXconfPlugin,DomainAdministeredObjectsPlugin,DomainStructurePlugin,EsiPropertiesPlugin,GatherEveryLogPlugin,GatherFilePlugin,GatherFolderPlugin,GatherInfoScriptPlugin,GatherLogsPlugin,GroupDomainAndLocationPlugin,IePropertiesPlugin,IlwcmigrationFolderPlugin,InstallerLogsPlugin,InvalidContainerTemplatesPlugin,InvalidLdapEntriesPlugin,InvalidObjectsPlugin,LocateDanglingReferencesPlugin,Log4jFilesPlugin,Log4jUpgradeFilesPlugin,MBeanDumpPlugin,MigrationLogsPlugin,MigrationPropertiesPlugin,MigrationReportsFolderPlugin,MissingMasterPlugin,MissingRepresentablesPlugin,NullContainerReferencesCheckPlugin,ObjectInitializationRuleReportPlugin,PublishMonitorLogsPlugin,ReportingInstallerFolderPlugin,ReportingInstlogFolderPlugin,ReportingLogsFolderPlugin,SearchPropertiesPlugin,SiteXconfPlugin,UpgradeFolderPlugin,ValidateFamilyTableDataPlugin,VendorPortalPropertiesPlugin,VersionAttributeAlignmentPlugin,WDSPlugin,WindchillLogsPlugin,WinDULogsPlugin,WinRULogsPlugin,WtCustomFolderPlugin,WtPropertiesPlugin,WtSafeAreaFolderPlugin,WvsPropertiesPlugin
Represents a plug-in for the System Configuration Collector. A plugin is a
collection of code to be executed by the SCC to carry out a discrete piece
of work.
Each plugin is an MBean and must implement the PluginMBean interface.
This interface specifies the contract required to implement a plugin
while ensuring its use as an MBean. This class can be extended into new
interface hierarchies to provide additional functionality.
Implementing this class allows a plugin to expose attributes and
operations that can be executed from a JMX console.
This class contains the primary APIs to implement MBean attributes
and operations.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether a plugin requires database administrator credentials to execute properly or not.booleanWhether a plugin requires windchill database credentials to execute properly or not.The two abstract collect(...) methods are part of the PluginMBean interface and must be implemented by all plugins.The two abstract collect(...) methods are part of the PluginMBean interface and must be implemented by all plugins.booleanWhether the plugin operates across all cluster nodes or only a single node where the plugin execution request was made.booleanWhether when the plugin execution results in data collection if that collection should be compressed or not.Obtain the name of the configuration file.booleanWhether or not the plugin relies on date ranges when executing it's data collection.Description of the plugin.Obtains the display name of the plugin.Obtains the MBean name of the plugin.getName()Deprecated.Needs to be implemented so that plugin objects can be displayed in a Windchill UI Tree component.Obtain the PluginType for this plugin.Obtians the version number information of the plugin.voidsetClusterAware(boolean isClusterAware) Whether a plugin operates across a cluster or one the node that receives the plugin execution request.voidsetCompressOutput(boolean compressOutput) Whether the plugin collection output should be compressed or not.voidsetDatabaseCredentials(String user, String password) The user name and password with administrator access to the database.voidsetDateRangeUsed(boolean isDateRangeUsed) Whether a date range is used as a filter for data collection during plugin execution.voidsetDisplayName(String displayName) Set the display name of the plugin.voidsetMBeanName(String mBeanName) Set the MBean name of the plugin.Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
areDbCredentialsNeeded
boolean areDbCredentialsNeeded()Whether a plugin requires database administrator credentials to execute properly or not.
Supported API: true- Returns:
-
areWindchillCredentialsNeeded
boolean areWindchillCredentialsNeeded()Whether a plugin requires windchill database credentials to execute properly or not.
Supported API: true- Returns:
-
collect
@MBeanOperationImpact(1) Map<String,Object> collect(long callNumber, long maxAgeInDays, long minAgeInDays, String pathTimeStamp) The two abstract collect(...) methods are part of the PluginMBean interface and must be implemented by all plugins. These methods specify the API's necessary to interact with the Collector class and plugin Collection framework that accomplishes the plugin work when gathering files. In general cases, the AbstractPlugin and other Abstract classes the the com.ptc.customersupport.mbeans.* packages in the plugin hierarchy provide default implementations that can be relied upon for the collect(...) methods. Specifically, the collectData(...) method of AbstractPlugin.java can often simply be called by the collect(...) methods. However, more advanced plugins that handle very specific needs may require these methods to be overridden and implemented directly, not relying on default behavior. Generally, these cases are rare and only occur when a plugin isn't simply collecting files but rather needs to run some Java process or invoke some separate operation that does processing which results in a file that then needs to be collected. There are plugins in the com.ptc.customersupport.plugin.* packages that do this which can be examined for examples, specifically, see MBeanDumpPlugin.java, WDSPlugin.java and AbstractWinduPlugin.java. A sample collect(...) method implementation would be:- Parameters:
callNumber- This is a long value that is associated with a PTC Technical Support call number. It is used as a location to collect plugin data to. This value should not need to be modified by the collect(...) method implementation.maxAgeInDays- A long value that is a starting time value for if files are collected with respect to time. This value should not need to be modified by the collect(...) method implementation.minAgeInDays- A long value that is an ending time value for if files are collected with respect to time. This value should not need to be modified by the collect(...) method implementation.pathTimeStamp- A String representation of a directory timestamp used as a name which plugins collect their data to. This value should not need to be modified by the collect(...) method implementation.- Returns:
- Map<String,Object> The return type is a Map that contains
an inner Map. Map<String,
Map<String, String>>. The "inner"
Map<String, String> is a Map that contains
the plugin execution status. The outer
Map<String, Object> is a Map that contains
which server the plugin executed on. This
allows the plugin framework to report
information across the cluster for each
plugin executed.
Supported API: true
-
collect
@MBeanOperationImpact(1) Map<String,Object> collect(String topicIdentifier, long maxAgeInDays, long minAgeInDays, String pathTimeStamp) The two abstract collect(...) methods are part of the PluginMBean interface and must be implemented by all plugins. These methods specify the API's necessary to interact with the Collector class and plugin Collection framework that accomplishes the plugin work when gathering files. In general cases, the AbstractPlugin and other Abstract classes the the com.ptc.customersupport.mbeans.* packages in the plugin hierarchy provide default implementations that can be relied upon for the collect(...) methods. Specifically, the collectData(...) method of AbstractPlugin.java can often simply be called by the collect(...) methods. However, more advanced plugins that handle very specific needs may require these methods to be overridden and implemented directly, not relying on default behavior. Generally, these cases are rare and only occur when a plugin isn't simply collecting files but rather needs to run some Java process or invoke some separate operation that does processing which results in a file that then needs to be collected. There are plugins in the com.ptc.customersupport.plugin.* packages that do this which can be examined for examples, specifically, see MBeanDumpPlugin.java, WDSPlugin.java and AbstractWinduPlugin.java. A sample collect(...) method implementation would be:- Parameters:
topicIdentifier- This is a String representation of a directory used as a location to collect plugin data to. This value should not need to be modified by the collect(...)method implementation.maxAgeInDays- A long value that is a starting time value for if files are collected with respect to time. This value should not need to be modified by the collect(...) method implementation.minAgeInDays- A long value that is an ending time value for if files are collected with respect to time. This value should not need to be modified by the collect(...) method implementation.pathTimeStamp- A String representation of a directory timestamp used as a name which plugins collect their data to. This value should not need to be modified by the collect(...) method implementation.- Returns:
- Map<String,Object> The return type is a Map that contains
an inner Map. Map<String,
Map<String, String>>. The "inner"
Map<String, String> is a Map that contains
the plugin execution status. The outer
Map<String, Object> is a Map that contains
which server the plugin executed on. This
allows the plugin framework to report
information across the cluster for each
plugin executed.
Supported API: true
-
getClusterAware
boolean getClusterAware()Whether the plugin operates across all cluster nodes or only a single node where the plugin execution request was made.
Supported API: true- Returns:
-
getCompressOutput
boolean getCompressOutput()Whether when the plugin execution results in data collection if that collection should be compressed or not.
Supported API: true- Returns:
-
getConfigFileName
String getConfigFileName()Obtain the name of the configuration file.
Supported API: true- Returns:
-
getDateRangeUsed
boolean getDateRangeUsed()Whether or not the plugin relies on date ranges when executing it's data collection.
Supported API: true- Returns:
-
getDescription
String getDescription()Description of the plugin. This is generally the work the plugin accomplishes during execution.
Supported API: true- Returns:
-
getDisplayName
String getDisplayName()Obtains the display name of the plugin.
Supported API: true- Returns:
-
getMBeanName
String getMBeanName()Obtains the MBean name of the plugin.
Supported API: true- Returns:
-
getName
Deprecated.Name of the plugin.
Supported API: true- Returns:
-
getNmObject
Needs to be implemented so that plugin objects can be displayed in a Windchill UI Tree component.- Returns:
- NmObject
- Throws:
WTException-
Supported API: true
-
getPluginType
PluginType getPluginType()Obtain the PluginType for this plugin.
Supported API: true- Returns:
-
getPluginVersion
String getPluginVersion()Obtians the version number information of the plugin.
Supported API: true- Returns:
-
setClusterAware
void setClusterAware(boolean isClusterAware) Whether a plugin operates across a cluster or one the node that receives the plugin execution request.
Supported API: true- Parameters:
isClusterAware-
-
setCompressOutput
void setCompressOutput(boolean compressOutput) Whether the plugin collection output should be compressed or not.
Supported API: true- Parameters:
compressOutput-
-
setDatabaseCredentials
The user name and password with administrator access to the database.
Supported API: true- Parameters:
user-password-
-
setDateRangeUsed
void setDateRangeUsed(boolean isDateRangeUsed) Whether a date range is used as a filter for data collection during plugin execution.
Supported API: true- Parameters:
isDateRangeUsed-
-
setDisplayName
Set the display name of the plugin.
Supported API: true -
setMBeanName
Set the MBean name of the plugin. The value should be a properly formed MBean Object Name represented as a String.
Supported API: true
-