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.
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. |
replaceDataSource_internalized(System.Guid oldUniqueId, byte[] contents)
public final System.Guid replaceDataSource_internalized(System.Guid oldUniqueId, byte[] contents)
Replaces the data source in the global resources 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 data for a new data source. |
Returns: com.aspose.ms.System.Guid - The unique identifier of the created embedded data source. LiFdDataSource .
replaceDataSource_internalized(PlacedResource placedResource, String linkedPath)
public final System.Guid replaceDataSource_internalized(PlacedResource placedResource, String linkedPath)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| placedResource | PlacedResource | |
| linkedPath | java.lang.String |
Returns: com.aspose.ms.System.Guid
replaceDataSource_internalized(PlacedResource placedResource, String linkedPath, boolean isReplaceOnlyThis)
public final System.Guid replaceDataSource_internalized(PlacedResource placedResource, String linkedPath, boolean isReplaceOnlyThis)
Replaces the data source in a global LinkResource resources with the newly created data source from 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. |
toString()
public String toString()
Returns: java.lang.String
updateAllModifiedContent()
public final void updateAllModifiedContent()
Updates the content of all modified smart objects in the image.
updateDuplicateLayers_internalized(System.Guid oldGuid, System.Guid newGuid, ResolutionSetting resolution)
public final void updateDuplicateLayers_internalized(System.Guid oldGuid, System.Guid newGuid, ResolutionSetting resolution)
Updates all smart object layers within the container whose UniqueId matches oldGuid . The matching layers UniqueId are reassigned to newGuid and their content is refreshed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| oldGuid | com.aspose.ms.System.Guid | The unique identifier of the original smart object data source to be replaced. |
| newGuid | com.aspose.ms.System.Guid | The unique identifier of the new smart object data source to assign. |
| resolution | ResolutionSetting | The resolution settings to apply when updating content. If null , the image resolution is used. |
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 |