SmartObjectProvider

Inheritance: java.lang.Object

public class SmartObjectProvider

Defines the smart object provider that provides getting / setting data sources from global link resources of the PSD file and their contents.

Methods

MethodDescription
convertToSmartObject(Layer[] layers)Converts layers to an embedded smart object.
convertToSmartObject(int[] layerNumbers)Converts layers to an embedded smart object.
create_internalized(LnkeResource externalLinkResource, Lnk2Resource embeddedLinkResource, PsdImage container)Initializes a new instance of the SmartObjectProvider class.
embedAllLinked()Embeds all linked smart objects in the image.
equals(Object arg0)
getClass()
getContentType_internalized(System.Guid uniqueId)Gets the type of the smart object layer content.
getContents_internalized(System.Guid uniqueId)Gets the embedded or linked file contents.
getDataSource_internalized(System.Guid uniqueId)Gets the link data source by unique id.
hashCode()
loadContents_internalized(System.Guid uniqueId, LoadOptions options)Loads the contents.
newSmartObjectViaCopy(SmartObjectLayer sourceLayer)Creates a new smart object layer by coping the source one.
notify()
notifyAll()
replaceContents_internalized(System.Guid uniqueId, byte[] contents)Replaces the contents with the provided contents to embed.
replaceContents_internalized(PlacedResource placedResource, String linkedPath)Replaces the contents with the provided external file.
setContents_internalized(System.Guid uniqueId, byte[] data)Sets the embedded or external file contents.
setDataSource(LinkDataSource dataSource)Sets (replaces or adds) the link data source in the global link resource.
toString()
updateAllModifiedContent()Updates the content of all modified smart objects in the image.
wait()
wait(long arg0)
wait(long arg0, int arg1)

convertToSmartObject(Layer[] layers)

public final SmartObjectLayer convertToSmartObject(Layer[] layers)

Converts layers to an embedded smart object.

Parameters:

ParameterTypeDescription
layersLayer[]The layers.

Returns: SmartObjectLayer - The created SmartObjectLayer instance.

convertToSmartObject(int[] layerNumbers)

public final SmartObjectLayer convertToSmartObject(int[] layerNumbers)

Converts layers to an embedded smart object.

Parameters:

ParameterTypeDescription
layerNumbersint[]The layer numbers.

Returns: SmartObjectLayer - The created SmartObjectLayer instance.

create_internalized(LnkeResource externalLinkResource, Lnk2Resource embeddedLinkResource, PsdImage container)

public static SmartObjectProvider create_internalized(LnkeResource externalLinkResource, Lnk2Resource embeddedLinkResource, PsdImage container)

Initializes a new instance of the SmartObjectProvider class.

Parameters:

ParameterTypeDescription
externalLinkResourceLnkeResource
embeddedLinkResourceLnk2Resource
containerPsdImageThe container.

Returns: SmartObjectProvider

embedAllLinked()

public final void embedAllLinked()

Embeds all linked smart objects in the image.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getContentType_internalized(System.Guid uniqueId)

public final int getContentType_internalized(System.Guid uniqueId)

Gets the type of the smart object layer content.

Parameters:

ParameterTypeDescription
uniqueIdcom.aspose.ms.System.GuidThe unique identifier.

Returns: int - The type of the smart object layer content.

getContents_internalized(System.Guid uniqueId)

public final byte[] getContents_internalized(System.Guid uniqueId)

Gets the embedded or linked file contents.

Parameters:

ParameterTypeDescription
uniqueIdcom.aspose.ms.System.GuidThe unique identifier of the link data source.

Returns: byte[] - The byte[] contents.

getDataSource_internalized(System.Guid uniqueId)

public final LinkDataSource getDataSource_internalized(System.Guid uniqueId)

Gets the link data source by unique id.

Parameters:

ParameterTypeDescription
uniqueIdcom.aspose.ms.System.GuidThe unique identifier.

Returns: LinkDataSource - The LinkDataSource instance.

hashCode()

public native int hashCode()

Returns: int

loadContents_internalized(System.Guid uniqueId, LoadOptions options)

public final Image loadContents_internalized(System.Guid uniqueId, LoadOptions options)

Loads the contents.

Parameters:

ParameterTypeDescription
uniqueIdcom.aspose.ms.System.GuidThe unique identifier.
optionsLoadOptionsThe load options.

Returns: Image - The loaded Image instance.

newSmartObjectViaCopy(SmartObjectLayer sourceLayer)

public final SmartObjectLayer newSmartObjectViaCopy(SmartObjectLayer sourceLayer)

Creates a new smart object layer by coping the source one.

Parameters:

ParameterTypeDescription
sourceLayerSmartObjectLayerThe source layer.

Returns: SmartObjectLayer - The cloned SmartObjectLayer instance.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

replaceContents_internalized(System.Guid uniqueId, byte[] contents)

public final System.Guid replaceContents_internalized(System.Guid uniqueId, byte[] contents)

Replaces the contents with the provided contents to embed.

Parameters:

ParameterTypeDescription
uniqueIdcom.aspose.ms.System.GuidThe unique identifier of the existing data source.
contentsbyte[]The contents.

Returns: com.aspose.ms.System.Guid - The unique identifier of the created embedded data source. LiFdDataSource .

replaceContents_internalized(PlacedResource placedResource, String linkedPath)

public final System.Guid replaceContents_internalized(PlacedResource placedResource, String linkedPath)

Replaces the contents with the provided external file.

Parameters:

ParameterTypeDescription
placedResourcePlacedResourceThe placed resource.
linkedPathjava.lang.StringThe absolute path to the linked file.

Returns: com.aspose.ms.System.Guid - The unique identifier java.util.UUID of the created linked data source. LiFeDataSource.

setContents_internalized(System.Guid uniqueId, byte[] data)

public final void setContents_internalized(System.Guid uniqueId, byte[] data)

Sets the embedded or external file contents.

Parameters:

ParameterTypeDescription
uniqueIdcom.aspose.ms.System.GuidThe unique identifier of the link data source.
databyte[]The data.

setDataSource(LinkDataSource dataSource)

public final void setDataSource(LinkDataSource dataSource)

Sets (replaces or adds) the link data source in the global link resource.

Parameters:

ParameterTypeDescription
dataSourceLinkDataSourceThe link data source.

toString()

public String toString()

Returns: java.lang.String

updateAllModifiedContent()

public final void updateAllModifiedContent()

Updates the content of all modified smart objects in the image.

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int