1 /* 2 * #%L 3 * wcm.io 4 * %% 5 * Copyright (C) 2024 wcm.io 6 * %% 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * #L% 19 */ 20 package io.wcm.handler.mediasource.ngdm.impl; 21 22 /** 23 * Service to access Next Generation Dynamic Media configuration. 24 */ 25 public interface NextGenDynamicMediaConfigService { 26 27 /** 28 * Placeholder for Asset ID used in delivery base paths. 29 */ 30 String PLACEHOLDER_ASSET_ID = "{asset-id}"; 31 32 /** 33 * Placeholder for SEO name used in delivery base paths. 34 */ 35 String PLACEHOLDER_SEO_NAME = "{seo-name}"; 36 37 /** 38 * Placeholder for format (image file extension) used in delivery base paths. 39 */ 40 String PLACEHOLDER_FORMAT = "{format}"; 41 42 /** 43 * Checks if the configuration/feature is enabled. 44 * @return true if enabled and false otherwise 45 */ 46 boolean enabled(); 47 48 /** 49 * Gets the absolute URL for the javascript which contains the microfrontend for the remote asset selector. 50 * @return the absolute URL for the javascript which contains the microfrontend for the remote asset selector 51 */ 52 String getAssetSelectorsJsUrl(); 53 54 /** 55 * Gets the path expression for the image delivery path. The following placeholders with the below meaning are 56 * contained within that path: 57 * <ul> 58 * <li><code>{asset-id}</code> - the uuid of the asset in the format 'urn:aaid:aem:UUID', e.g. 59 * urn:aaid:aem:1a034bee-ebda-4787-bad3-f924d0772b75</li> 60 * <li><code>{seo-name}</code> - any url-encoded or alphanumeric, non-whitespace set of characters. may contain 61 * hyphens and 62 * dots</li> 63 * <li><code>{format}</code> - output format</li> 64 * </ul> 65 * @return the path expression for the image delivery path 66 */ 67 String getImageDeliveryBasePath(); 68 69 /** 70 * Gets the path expression for the adaptive video manifest/player path. The 71 * following placeholders with the below meaning are contained 72 * within that path: 73 * <ul> 74 * <li><code>{asset-id}</code> - the uuid of the asset in the format 'urn:aaid:aem:UUID' 75 * along with optional format 76 * e.g. urn:aaid:aem:1a034bee-ebda-4787-bad3-f924d0772b75 OR 77 * urn:aaid:aem:1a034bee-ebda-4787-bad3-f924d0772b75.mp4</li> 78 * </ul> 79 * @return the path expression for the video delivery path 80 */ 81 String getVideoDeliveryPath(); 82 83 /** 84 * Gets the path expression for the the Original Asset Delivery which delivers 85 * the bitstream as-is 86 * <ul> 87 * <li><code>{asset-id}</code> - the uuid of the asset in the format 'urn:aaid:aem:UUID', 88 * e.g. urn:aaid:aem:1a034bee-ebda-4787-bad3-f924d0772b75</li> 89 * <li><code>{seo-name}</code> - any url-encoded or alphanumeric, non-whitespace set of 90 * characters. may contain hyphens and dots</li> 91 * </ul> 92 * @return the path expression for the asset (bitstream) delivery path 93 */ 94 String getAssetOriginalBinaryDeliveryPath(); 95 96 /** 97 * Gets the path expression for getting the metadata of an asset. The following 98 * placeholders with the below meaning are contained within 99 * that path: 100 * <ul> 101 * <li><code>{asset-id}</code> - the uuid of the asset in the format 'urn:aaid:aem:UUID', 102 * e.g. urn:aaid:aem:1a034bee-ebda-4787-bad3-f924d0772b75</li> 103 * </ul> 104 * @return the path expression for the metadata path 105 */ 106 String getAssetMetadataPath(); 107 108 /** 109 * Gets the Next Generation Dynamic Media tenant (also known technically as the repository ID). 110 * @return the repository ID 111 */ 112 String getRepositoryId(); 113 114 /** 115 * Gets the API key for accessing the asset selectors UI 116 * @return the API key for accessing the asset selectors UI 117 */ 118 String getApiKey(); 119 120 /** 121 * Gets the environment string which should be 'PROD' or 'STAGE' 122 * @return the environment string 123 */ 124 String getEnv(); 125 126 /** 127 * Gets the IMS client identifier 128 * @return the IMS client identifier 129 */ 130 String getImsClient(); 131 132 }