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
convertToSmartObject(Layer[] layers)
public final SmartObjectLayer convertToSmartObject(Layer[] layers)
Converts layers to an embedded smart object.
Parameters:
Parameter | Type | Description |
---|---|---|
layers | Layer[] | 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:
Parameter | Type | Description |
---|---|---|
layerNumbers | int[] | 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:
Parameter | Type | Description |
---|---|---|
externalLinkResource | LnkeResource | |
embeddedLinkResource | Lnk2Resource | |
container | PsdImage | The 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:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
uniqueId | com.aspose.ms.System.Guid | The 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:
Parameter | Type | Description |
---|---|---|
uniqueId | com.aspose.ms.System.Guid | The 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:
Parameter | Type | Description |
---|---|---|
uniqueId | com.aspose.ms.System.Guid | The unique identifier. |
Returns: LinkDataSource - The LinkDataSource instance.
getLayersForUpdateContents_internalized()
public final System.Collections.Generic.List<SmartObjectLayer> getLayersForUpdateContents_internalized()
It gets or sets layer when contents must be changed
Returns: com.aspose.ms.System.Collections.Generic.List<com.aspose.psd.fileformats.psd.layers.smartobjects.SmartObjectLayer>
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:
Parameter | Type | Description |
---|---|---|
uniqueId | com.aspose.ms.System.Guid | The unique identifier. |
options | LoadOptions | The 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:
Parameter | Type | Description |
---|---|---|
sourceLayer | SmartObjectLayer | The source layer. |
Returns: SmartObjectLayer - The cloned SmartObjectLayer instance.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
removeOrphanedDataSources_internalized(System.Collections.Generic.List<System.Guid> actualDataSources)
public final void removeOrphanedDataSources_internalized(System.Collections.Generic.List<System.Guid> actualDataSources)
Removes data sources from embedded and external resources that are not present in the provided list of valid GUIDs. This method cleans up orphaned data sources by comparing against the current valid data source identifiers.
Parameters:
Parameter | Type | Description |
---|---|---|
actualDataSources | com.aspose.ms.System.Collections.Generic.List<com.aspose.ms.System.Guid> | The list of valid data source GUIDs to retain. Data sources not in this list will be removed. |
replaceContents_internalized(System.Guid oldUniqueId, byte[] contents)
public final System.Guid replaceContents_internalized(System.Guid oldUniqueId, byte[] contents)
Replaces the contents with the provided contents to embed.
Parameters:
Parameter | Type | Description |
---|---|---|
oldUniqueId | com.aspose.ms.System.Guid | The unique identifier of the existing data source. |
contents | byte[] | 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)
Parameters:
Parameter | Type | Description |
---|---|---|
placedResource | PlacedResource | |
linkedPath | java.lang.String |
Returns: com.aspose.ms.System.Guid
replaceContents_internalized(PlacedResource placedResource, String linkedPath, boolean isReplaceOnlyThis)
public final System.Guid replaceContents_internalized(PlacedResource placedResource, String linkedPath, boolean isReplaceOnlyThis)
Replaces the contents with the provided external file.
Parameters:
Parameter | Type | Description |
---|---|---|
placedResource | PlacedResource | The placed resource. |
linkedPath | java.lang.String | The absolute path to the linked file. |
isReplaceOnlyThis | boolean | If true, then don’t remove data source in global resources. |
Returns: com.aspose.ms.System.Guid - The unique identifier Guid of the created linked data source. LiFeDataSource.
setContents_internalized(System.Guid uniqueId, byte[] data, String fileType)
public final void setContents_internalized(System.Guid uniqueId, byte[] data, String fileType)
Sets the embedded or external file contents.
Parameters:
Parameter | Type | Description |
---|---|---|
uniqueId | com.aspose.ms.System.Guid | The unique identifier of the link data source. |
data | byte[] | The data. |
fileType | java.lang.String | The data file type. |
setDataSource(LinkDataSource dataSource)
public final void setDataSource(LinkDataSource dataSource)
Sets (replaces or adds) the link data source in the global link resource.
Parameters:
Parameter | Type | Description |
---|---|---|
dataSource | LinkDataSource | The link data source. |
setLayersForUpdateContents_internalized(System.Collections.Generic.List value)
public final void setLayersForUpdateContents_internalized(System.Collections.Generic.List<SmartObjectLayer> value)
It gets or sets layer when contents must be changed
Parameters:
Parameter | Type | Description |
---|---|---|
value | com.aspose.ms.System.Collections.Generic.List<com.aspose.psd.fileformats.psd.layers.smartobjects.SmartObjectLayer> |
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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |