You can configure OTB actions in Quark Publishing Platform NextGen through the file application-config.json at the location application/conf in the s3 bucket. If you are doing the configuration for the first time, you may have to create the folder conf and the file application-config.jsonThe file application-config.json allows the following configurations:
To create revision on property update:
createRevisionOnPropertyChange: true/false (default value is true)
Tableau based audit tab for asset in asset detail view
showAssetAuditTab: true/false (default value is false)
assetAuditWordbook: Path of the Tableau worksheet (default value is “views/CE-Audit-Workspace-Dashboard/Audit_Asset_Dashboard”)
To display all the links to an asset version:
showAllLinksWithVersion: true/false (default value is false)
To make workflow mandatory while checking in an asset:
workflowMandatory: true/false (default value is false)
To enable the hide collection feature:
enableHideCollection: true/false (default value is false)
To configure custom date format in Properties pane:
propertiesDateFormat: string (default value is ‘M dd, yy‘)
propertiesDateTimeSeparator: string (default value is ‘,‘)
Date format can have the following notations:
d - day ofmonth(no leading zero)
dd - day ofmonth(two digits)
o - day of the year(no leading zeros)
oo - day of the year(three digits)D- day name short
DD- day name long
m - month ofyear(no leading zero)
mm - month ofyear(two digits)M- month name short
MM- month name long
y -year(two digits)
yy -year(four digits)
@ - Unix timestamp(ms since 01/01/1970)!- Windows ticks(100ns since 01/01/0001)'...'- literal text
''- single quote
anything else- literal text
To disable check-in through drag and drop action:
disableCheckinDragAndDrop: true/false (defaukt value is false)
A custom JavaScript file that registers callback hooks/events must be available in the file extensibility.json in the folder conf in the directory applicationservice in the s3 bucket. The sample code to register an event is as follows: (Purpose: Prevent check-in in collection.)
newCollection: Object – Collection info like name.
BEFORE_DUPLICATE_ASSET_ACTION Triggers before asset duplicate action Event data:
entity: Entity – Asset Entity object
Return false to cancel the event
AFTER_DUPLICATE_ASSET_ACTION Triggers before asset duplicate action Event data:
entity: Entity – Asset Entity object
newAssetInfo: Object – Contains information about newly created asset
BEFORE_DUPLICATE_COLLECTION_ACTION Triggers before collection duplicate action Event data:
entity: Entity – Collection Entity object
Return false to cancel the event
BEFORE_DUPLICATE_COLLECTION_SUBMIT Triggers before collection duplicate submit/done Event data:
collection: Object – Collection to be created with inputs
Return { collection } to update payload or false to cancel the event
AFTER_DUPLICATE_COLLECTION_SUBMIT Triggers after collection duplicate submit/done Event data:
collection: Object – Data about Newly created collection
BEFORE_EDIT_COLLECTION_PROPERTIES_ACTION Triggers before edit collection properties action Event data:
collectionMeta: Object – Data about collection
Return false to cancel the event
BEFORE_EDIT_COLLECTION_PROPERTIES_SUBMIT Triggers before edit collection properties submit/done Event data:
attributes: Object[] – Array of collection attributes
Return { attributes } to update payload or false to cancel the event
AFTER_EDIT_COLLECTION_PROPERTIES_SUBMIT Triggers after edit collection properties submit/done Event data:
attributes: Object[] – Array of collection attributes
BEFORE_EDIT_ASSET_PROPERTIES_ACTION Triggers before edit asset properties action Event data:
assetMeta: Object – Data about asset – when invoked from asset detail OR
entities: Entities[] – Array of Entity objects
Return false to cancel the event
BEFORE_ASSET_PROPERTIES_SUBMIT Triggers before edit asset properties submit/done Event data:
entities: Entities[] – Array of Entity objects, only in case of multi select
attributes: Object[] – Array of asset attributes
Return { attributes } to update payload or false to cancel the event
AFTER_ASSET_PROPERTIES_SUBMIT Triggers after edit asset properties submit/done Event data:
entities: Entities[] – Array of Entity objects, only in case of multi select
attributes: Object[] – Array of asset attributes
successEntities: Entities[] – Array of Entity objects, only in case of multi select
failureEntities: Entities[] – Array of Entity objects, only in case of multi select
BEFORE_WORKFLOW_ASSET_SUBMIT Triggers before workflow asset submit/done Event data:
assetId: number – Asset Id
attributes: Object – Asset attributes
Return { attributes } to update payload or false to cancel the event
AFTER_WORKFLOW_ASSET_SUBMIT Triggers after workflow asset submit/done Event data:
assetId: number – Asset Id
attributes: Object – Asset attributes
BEFORE_ASSET_UPLOAD_ACTION Triggers on file upload action
Return false to cancel the event
BEFORE_UPLOAD_FOLDER_ACTION Triggers on folder upload action
Return false to cancel the event
BEFORE_ASSET_PREVIEW_TAB_ACTION Triggers on Preview tab select Event data:
assetMeta: Object – Data about asset
Return false to cancel the event
BEFORE_ASSET_HISTORY_TAB_ACTION Triggers on History tab select Event data:
assetMeta: Object – Data about asset
Return false to cancel the event
BEFORE_ASSET_LINK_TAB_ACTION Triggers on Links tab select Event data:
assetMeta: Object – Data about asset
Return false to cancel the event
BEFORE_ASSET_PROPERTIES_TAB_ACTION Triggers on Properties tab select Event data:
assetMeta: Object – Data about asset
Return false to cancel the event
BEFORE_ASSET_AUDIT_TAB_ACTION Triggers on Audit tab select Event data:
assetMeta: Object – Data about asset
Return false to cancel the event
BEFORE_WORKFLOW_DIALOG_OPEN Triggers before workflow dialog is opened on uploading new file/folder. Event data:
attributes: Object – Data about asset
silentSubmit: Boolean – Default false – Set true to silently checkin the file.
Additional Option that can be set:
attributes.assetAttributes: Array[Object]- Pass this when asset form attributes needs to be updated.
Format – { “attributeId”: 1XX, “attributeValue”: { “value”: “”}}
For example, for different type of attributes, the value key contains a different value.
Domain – Contains the array of domainValue values for multiple type domain attributes or contains the single object of the domainValue value for single type domain attribute. Text – Contains a text string. Date, DateTime, Time – Contain date, datetime, and time string, respectively. Boolean – Contain true or false. Number, Measurement – Contain Int and double type of value.
attributes.versioning: “major“ | “minor“ | “custom“ – Default “minor“ – This option is to create a minor, a major, or a custom version.
atrtibutes.initialMajorVersion: number – Defaullt 0 – This option is to specify the initial major version when versioning is of type “custom“.
atrtibutes.initialMinorVersion: number – Defaullt 1 – This option is to specify the initial minor version when versioning is of type “custom“.
Return false to cancel the event
BEFORE_READ_ONLY_ACTION Triggers before read only action Event data:
assetId: number – Id of the asset
contentType: string – Content type of asset
majorVersion: number – Major version of asset
minorVersion: number – Minor version of asset
Return false to cancel the event
BEFORE_REVERT_TO_VERSION_ACTION Triggers before revert to version action Event data:
assetId: number – Id of the asset
revertVersion: Object – Contains major and minor version of the revert version
latestVersion: Object – Contains major and minor version of the current latest version
createMinorVersion: boolean – whether to create major or minor version
Return { createMinorVersion } to update the payload false to cancel the event
AFTER_REVERT_TO_VERSION_ACTION Triggers after revert to version action Event data:
attributes: Object[] – attributes of new create version
Create a folder conf in the directory applicationservice in the s3 bucket.
Add the file entity-actions.json to this folder. The file entity-actions.json contains the following extensible entity actions and blade actions:
assetContextMenuActions: These are the actions that Quark Publishing Platform NextGen displays when you select the ellipses icon associated to an entity – asset or collection.
collectionContextMenuActions: These are the actions that Quark Publishing Platform NextGen displays when you select the ellipses icon associated to a collection
assetQuickActions: These are the actions that Quark Publishing Platform NextGen displays next to an asset.
collectionQuickActions: These are the actions that Quark Publishing Platform NextGen displays next to a collection.
otherActions: These are the actions that Quark Publishing Platform NextGen displays across the Workspace User Interface, which could be asset/action specific or universal.
Action Objects
An action object can have the following attributes based on the type of action:
Attribute
Applicable to action type
Description
id
All
A unique id of an action
type
All
An action type specifies the function an action performs. There are four action types:
displayText
All
The name of the action on the User Interface.
hidden
All
A Boolean value to show/hide the action button.
iconUrl
All
The URL of the icon for an action button
VisibilityHandler
All
Name of the function to handle visibility for actions.
actionUrl
endpoint
The URL of the API endpoint.
dialogUrl
dialog
The location of the iframe index page.
dialogConfig {height; width;}
dialog
The attribute to specify the height and width of the dialog box. When you do not specify these dimensions, Quark Publishing. Platform NextGen assign a default dimension of 600px X 600px.
tabId
tab
The id of the tab that you select in the accessQuickActions.
parentId
menu
The Id of the menu type to which an action in the context menu belongs to.
context
All (but specific to topBarViewActions)
Context defines the OTB actions that Quark Publishing. Platform NextGen displays based on the tab you select. In the image below, each of the tabs – Home, Favorites, My Assignments, Continue Editing, Searches, and Browse – has its own context which decides the actions that appear on the top bar.
NOTE: An otherActions action entity only has two attributes – id and visibilityHandler.
Action Type Examples
The following are some basic examples of each of the action types
Endpoint
{“id”: “qpp-send-to-sharepoint-id”,“type”: “endpoint”,“hidden”:true,“displayText”: “Send to Sharepoint”,“iconUrl”:“http://icons.iconarchive.com/icons/dakirby309/simplystyled/32/Microsoft-SharePoint-2013-icon.png”,“actionUrl”: “/customer/api/sendToSharepoint”
}
The visibilityHandler is a function that gets a callback from the context in which you perform an action through the User Interface. For example, Quark Publishing Platform NextGen passes an entity object to the function visibilityHandler for context menu and quick actions, and passes an asset object for tabs.
To load the function visibilityHandler, the file extensibility.json must be the folder conf in the directory applicationservice in the s3 bucket. The file extensibility.json contains JavaScript property, which is an array of the paths of JavaScript relative to the folder conf. For example, the path for the file entity-actions.js in the folder conf is as follows:
For iconUrl, you can use an absolute URL or you can add a custom image to the folder conf/assets and then use the protocol “s3://” to load the image from relative path. For example, the iconUrl “s3://people.png” loads the image people.png available at the location applicationservice/conf/assets. The entity-actions config is merged with the default action config listed below.
Create a new class component that implements the class component AbstractPlugin in the module platform-components-ng.
Override the method onPluginActivated that listens for the callback from the custom tab component and carries BehaviorSubject for the event data.
After you have created an angular library, host the JavaScript UMD file at a location of your choice. You can find the location in the distribution folder of your angular project.
Create the file plugins-config.json and store it in the folder conf in the directory applicationservice in the s3 bucket. The file plugins-config.json contains an array of plugin objects.
A plugin object has the following attributes:
Attribute
Description
id
A unique id of a plugin.
name
The name of a plugin.
description
The description of a plugin.
extensionPoint
A custom extenstionPoint tells where to load a plugin. For custom library type, you should use the same extensionPoint.
url
The complete URL to the single JavaScript UMD bundle in an angular library module