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
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
/** | |
* 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
/** | |
* 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
/** | |
* Uploads assets to WorldServer's Explorer (mounts) by posting to the "upload_assets" servlet. | |
* | |
* @param wsBaseUrl | |
* @param token | |
* @param explorerFolder | |
* @param inputFile | |
* @throws IOException | |
*/ | |
private void uploadAssetsToExplorer(String wsBaseUrl, String token, String explorerFolder, File inputFile) 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
public static String getSecurityToken(String wsBaseUrl, String username, String password) throws IOException { | |
StringBuilder loginJson = new StringBuilder(); | |
loginJson.append("{"); | |
loginJson.append("\"username\":\"" + username + "\","); | |
loginJson.append("\"password\":\"" + password + "\""); | |
loginJson.append("}"); | |
HttpClient httpClient = HttpClientBuilder.create().build(); | |
HttpPost httpPostRequest = new HttpPost(wsBaseUrl + "/ws-api/v1/login"); | |
httpPostRequest.setHeader(new BasicHeader("Content-Type", "application/json")); |
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
public class FileUploadResponse { | |
private String name; | |
private String internalName; | |
private String fullName; | |
private String url; | |
private double size; | |
private long creationTime; | |
private boolean exists; | |
private File[] files; |
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
public class CreateProjectGroupResponse { | |
private String status; | |
private List<Response> response; | |
public String getStatus() { | |
return status; | |
} | |
public void setStatus(String status) { |
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
public class CurrentTaskStep { | |
private int id; | |
private String name; | |
private String displayName; | |
private String type; | |
private String typeName; | |
private List<WorkflowTransition> workflowTransitions; | |
public int getId() { |
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
public enum AssetLocationType { | |
SOURCE, | |
TARGET, | |
SOURCE_TARGET | |
} |