com.aspose.slides
Interface ILinkEmbedController

All Known Subinterfaces:
IVideoPlayerHtmlController
All Known Implementing Classes:
VideoPlayerHtmlController

public interface ILinkEmbedController

Callback interface used to determine how object should be processed during saving.


Method Summary
 int getObjectStoringLocation(int id, byte[] entityData, java.lang.String semanticName, java.lang.String contentType, java.lang.String recomendedExtension)
           Determines where object should be stored.
 java.lang.String getUrl(int id, int referrer)
           Returns an URL to an external object.
 void saveExternal(int id, byte[] entityData)
           Saves external object.
 

Method Detail

getObjectStoringLocation

int getObjectStoringLocation(int id,
                             byte[] entityData,
                             java.lang.String semanticName,
                             java.lang.String contentType,
                             java.lang.String recomendedExtension)

Determines where object should be stored. This method is called once for each object id. It is not guaranteed that there won't be two objects with same data, semanticName and contentType but with different id.

Parameters:
id - Object id. This id is saving operation-wide unique.
entityData - Object binary data. This parameter can be null, if object binary data is not generated yet.
semanticName - Some short text, describing meaning of object. Controller may use this as a part of external object name, but it is up to dispatcher to ensure that names will be unique and contain only allowed characters.
contentType - MIME type of object.
recomendedExtension - File name extension, recommended for this MIME type.
Returns:
Decision

getUrl

java.lang.String getUrl(int id,
                        int referrer)

Returns an URL to an external object. This method always called if GetObjectStoringLocation returned LinkEmbedDecision.Link and may be called if GetObjectStoringLocation returned LinkEmbedDecision.Embed but embedding is impossible. Can be called multiple time for same object id.

Parameters:
id - Object id. This id is saving operation-wide unique.
referrer - id of referrencing object or 0, if object is referrenced by the root document. May be used to generate relative link.
Returns:
Url of external object or null if this object should be ignored.

saveExternal

void saveExternal(int id,
                  byte[] entityData)

Saves external object.

Parameters:
id - Object id. This id is saving operation-wide unique.
entityDataObject - binary data. This parameter cannot be null.


Copyright © Copyright 2004-2016 Aspose Pty Ltd. All Rights Reserved.