public final class LayerResourcesRegistry extends Object
Represents the layer resources registry.
| Modifier and Type | Method and Description |
|---|---|
static ILayerResourceLoader |
getFirstSupportedDescriptor(InputStream stream,
int psdVersion)
Gets the first supported opener descriptor.
|
static ILayerResourceLoader |
getFirstSupportedDescriptorByTypeName(String descriptorTypeName)
Gets the first supported descriptor by its type name.
|
static ILayerResourceLoader[] |
getRegisteredDescriptors()
Gets the registered descriptors.
|
static LayerResource |
loadResourceByFirstSupportedDescriptor(InputStream stream,
int psdVersion)
Loads
LayerResource using first found opener suitable for the specified stream. |
static void |
registerOpener(ILayerResourceLoader openerDescriptor)
Registers the opener.
|
static void |
unregisterOpener(ILayerResourceLoader openerDescriptor)
Unregisters the opener.
|
public static ILayerResourceLoader[] getRegisteredDescriptors()
Gets the registered descriptors.
Value: The registered descriptors.public static ILayerResourceLoader getFirstSupportedDescriptorByTypeName(String descriptorTypeName)
Gets the first supported descriptor by its type name.
descriptorTypeName - The descriptor type name.
The first opener descriptor will be actually the last registered.
public static ILayerResourceLoader getFirstSupportedDescriptor(InputStream stream, int psdVersion)
Gets the first supported opener descriptor.
stream - The stream.psdVersion - The PSD version.
The first loader will be actually the last registered.
public static LayerResource loadResourceByFirstSupportedDescriptor(InputStream stream, int psdVersion)
Loads LayerResource using first found opener suitable for the specified stream.
stream - The stream.psdVersion - The PSD version.
The first opener will be actually the last registered.
LayerResource or null if no opener is found.public static void registerOpener(ILayerResourceLoader openerDescriptor)
Registers the opener.
openerDescriptor - The opener descriptor to register.public static void unregisterOpener(ILayerResourceLoader openerDescriptor)
Unregisters the opener.
openerDescriptor - The opener descriptor to unregister.