public class ComponentWrapper extends java.lang.Object implements ComponentService
| Modifier and Type | Class and Description | 
|---|---|
| static class  | ComponentWrapper.ComponentInstanceDetails | 
| static interface  | ComponentWrapper.ComponentServiceBackend | 
| Constructor and Description | 
|---|
| ComponentWrapper(java.lang.String pluginNameIn,
                java.lang.String instanceNameIn,
                ComponentCache componentCacheIn,
                MaskingComponent componentIn,
                MaskingLogService.MaskingLogServiceConfig maskingLogServiceConfig)Create a wrapper for a top level component | 
| Modifier and Type | Method and Description | 
|---|---|
| void | checkComponentDependencies(boolean isExternalAllowed)Recursively check all component dependencies referenced directly or indirectly by the wrapped component. | 
| void | cleanupComponent()Initiate cleanup on this component and any closeables opened by this wrapper for the component. | 
| <U> MaskingAlgorithm<U> | getAlgorithmByName(AlgorithmInstanceReference algorithmReference,
                  MaskingAlgorithm.MaskingType type)Get a MaskingAlgorithm object for the algorithm specified by the reference and type. | 
| CryptoService | getCryptoService(KeyReference reference)This implements the ComponentService method that provides access to the algorithm's key wrapped by the
 CryptoServiceImpl, which implements a number of cryptographic functions using that key. | 
| java.lang.String | getInstanceName()Get the name of this component instance. | 
| LogService | getLogService()Get a Logger object that can be used to log messages. | 
| java.lang.String | getPluginName() | 
| MaskingComponent | getUnreadyComponent()Get the component without calling setup. | 
| java.io.InputStream | openInputFile(FileReference fileRef)Method to open a file resource by URI. | 
| void | setLogService(MaskingLogService logService) | 
| MaskingComponent | setupComponentIfNeeded()Set up the wrapped component only if needed. | 
| void | validate() | 
public ComponentWrapper(java.lang.String pluginNameIn,
                        java.lang.String instanceNameIn,
                        ComponentCache componentCacheIn,
                        MaskingComponent componentIn,
                        MaskingLogService.MaskingLogServiceConfig maskingLogServiceConfig)
pluginNameIn - The name of the plugininstanceNameIn - The name of the component instancecomponentCacheIn - The component caching loadercomponentIn - The component being wrappedmaskingLogServiceConfig - A MaskingLogService.MaskingLogServiceConfig object for The configuration
                                of the logger.public MaskingComponent setupComponentIfNeeded()
public MaskingComponent getUnreadyComponent()
public void cleanupComponent()
public void validate()
              throws ComponentConfigurationException
ComponentConfigurationExceptionpublic java.lang.String getInstanceName()
getInstanceName in interface ComponentServicepublic void checkComponentDependencies(boolean isExternalAllowed)
isExternalAllowed - Whether dependencies may exist outside of the plugin that provided the componentInvalidDependencyException - When a dependency is invalid or would result in a dependency loopMissingDependencyException - When a dependency is missingpublic java.io.InputStream openInputFile(@Nonnull
                                         FileReference fileRef)
ComponentServiceopenInputFile in interface ComponentServicefileRef - A reference to the file to be opened.public <U> MaskingAlgorithm<U> getAlgorithmByName(@Nonnull AlgorithmInstanceReference algorithmReference, @Nonnull MaskingAlgorithm.MaskingType type)
ComponentServicegetAlgorithmByName in interface ComponentServiceU - The data type masked by the returned algorithm, must exactly match what is requested in typealgorithmReference - A reference describing the algorithm instance to gettype - The masking data type the named algorithm is expected maskpublic CryptoService getCryptoService(KeyReference reference)
getCryptoService in interface ComponentServicereference - A reference to the key to use. Currently, the reference value must be "", referring to the
                  default algorithm key assigned to this algorithm.public LogService getLogService()
ComponentServicegetLogService in interface ComponentServiceMaskingLogService object.public java.lang.String getPluginName()
public void setLogService(MaskingLogService logService)