This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Uploads customization package to WorldServer by posting to the "management_customization" servlet. | |
* | |
* @param wsBaseUrl | |
* @param token | |
* @param customizationFile | |
* @throws IOException | |
*/ | |
private void uploadCustomization(String wsBaseUrl, String token, File customizationFile) throws IOException { | |
String postActionUrl = wsBaseUrl + "/ws-legacy/management_customization?action=add&token=" + token; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Connects to SDL WorldServer via invoking the /login REST API call. | |
* | |
* @param wsBaseUrl | |
* @param username | |
* @param password | |
* @return a security token. | |
* @throws IOException | |
*/ | |
private String login(String wsBaseUrl, String username, String password) throws IOException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.worldservertraining; | |
import com.idiominc.wssdk.WSContext; | |
import com.idiominc.wssdk.WSVersion; | |
import com.idiominc.wssdk.component.servlet.WSHttpServlet; | |
import com.idiominc.wssdk.user.WSClient; | |
import com.idiominc.wssdk.workflow.WSProject; | |
import com.idiominc.wssdk.workflow.WSTask; | |
import javax.servlet.http.HttpServletRequest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tridion.ps.akamai; | |
import org.codehaus.jackson.annotate.JsonIgnoreProperties; | |
@JsonIgnoreProperties(ignoreUnknown = true) | |
public class AkamaiPurgeResponse { | |
private Integer httpStatus; | |
private Integer estimatedSeconds; | |
private Integer pingAfterSeconds; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<add key="IssuerName" value="http://localhost:89/IWSTrust13" /> | |
<add key="MediaManagerWebServiceAddress" value="https://TENANTNAME.sdlmedia.com/WebServices/MediaManager2011.svc" /> | |
<add key="ClientSettingsProvider.ServiceUri" value="" /> | |
</appSettings> | |
<system.serviceModel> | |
<bindings> | |
<ws2007FederationHttpBinding> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Migration.MediaManager; | |
using System.ServiceModel; | |
using System.IdentityModel.Tokens; | |
using System.Configuration; | |
using System.ServiceModel.Security; | |
using System.IdentityModel.Protocols.WSTrust; | |
namespace Migration.Helpers | |
{ | |
public class MediaManagerHelper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void UpdateWhereUsingComponents(ICoreService coreServiceClient, SessionAwareEclServiceClient eclClient, ComponentData componentData, Dictionary<string, object> uploadInfo) | |
{ | |
Dictionary<string, string> stubInfo = null; | |
try | |
{ | |
stubInfo = eclClient.CreateOrGetStubUris(new List<string> { "ecl:5-mm-" + uploadInfo["distributionId"] + "-dist-file" }); | |
} | |
catch(Exception exception) | |
{ | |
log.Error("Error generating stub for image " + componentData.Id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<client> | |
<endpoint name="EclBinaryEndpoint" | |
address="net.tcp://localhost:2660/ExternalContentLibrary/2012/netTcp" | |
binding="netTcpBinding" | |
bindingConfiguration="EclNetTcpBinding" | |
contract="Tridion.ExternalContentLibrary.Service.Client.ISessionAwareEclService"/> | |
</client> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<netTcpBinding> | |
<binding name="EclNetTcpBinding" maxReceivedMessageSize="2147483647" receiveTimeout="00:10:00" sendTimeout="00:10:00"> | |
<readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" /> | |
</binding> | |
</netTcpBinding> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Dictionary<string, object> UploadToMediaManager(IMediaManager2011 mediaManagerClient, | |
Dictionary<string, string> downloadInfo, long mediaManagerFolderId, long assetTypeId, | |
long outletId, long[] tags) | |
{ | |
// Upload to Media Manager | |
UploadInfoData uploadInfoData = new UploadInfoData | |
{ | |
Author = "Migration Upload Tool", | |
MakeAvailableForWebPublishing = true, | |
ProgramCreation = ProgramCreationOptions.OneProgramPerItem, |