Class Index

Classes


_global_

Field Summary
Field Attributes Field Name and Description
 
Maps conversion format to file extension.
 
ext to mime type mapping
 
Workflow to return the assetID given the path using a REST call
Method Summary
Method Attributes Method Name and Description
 
assetInfo(theAssetId)
A callback that just pushes the managed file into the response object
 
Utilities to help the /wf/restapi/v2/admin/* endpoints
 
buildCriterion(theJSONSearch)
Builds a Boolean criterion
 
cancel(theAsset)
Cancel the check out of the asset
 
checkin(theDestFile, theSourceFile)
Check in the working copy as a new version of the asset.
 
checkOut(theAsset)
Check out an asset
 
compressFiles(theCompressionJSON)
Compresses the assets into the named zip file in the destination folder
 
convert(theConversionJSON)
Submits the asset to the preview system
 
create(thePath)
Creates a file or folder from the path
 
createOrUpdateGroup(theJsGroup, theGroup)
Updates teh groups settings and users.
 
decompressFiles(theJSON)
Decompresses the file into the destination
 
doAction(theAsset)
Either check out or cancel a check out of an asset
 
doS3Upload(theFile, theDestination, theIsAsyncImport, theVersion)
Performs S3 upload.
 
downloadFiles(theUrls)
Downloads files by given url(s).
 
Deletes the file or folder defined in theJSON
 
fileOrFolderImport(theSource)
Imports the source file or folder and pushes it to the response.
 
findAclById(theId)
Gets the acl by the id if it exists or null if it doesn't.
 
findUser(theData)
Find a user by its userId or username in the data object
 
finishUpload(theFile, theDestination, theIsAsyncImport)
Finishes the standard upload.
 
folderContents(thePath)
Pushes directories to the response based upon the filters applied
 
generateSearch(theJSONSearch, theQuickSearch)
returns a Search wrapper created from the JSON search object
 
Gets the array of completed assets.
 
getDictionary(theDictionaryName)
Gets a dictionary and a list of words and put them into myData.
 
getDiscussion(theManagedFile)
Pushes the discussion data to the response
 
getFieldWrapper(theFile, theResourceWrapper, theProperty, theForcedType)
Gets a the container for the field.
 
getNewFieldValue(theFile, theResourceWrapper, theFieldJSON)
Gets a value to write to the file for the field defined in theFieldJSON
 
The user can pass in a directoryId as the root of whatever they are creating
 
Gets the searches for the current user.
 
Gets the selection for the current user.
 
getXmp(theManagedFile)
Pushes the asset to the response with the XMP string
 
includeDirectory(aSearch, theSearchDirectory)
Adds the directory to the quickSearch
 
incrementName(theParentPath, theOldName)
Used to increment files with the same name test.txt becomes test 1.txt
 
isAdmin(theUser)
Does the given user have the admin rights?
 
isAdminSearch(theSearchName)
Is admin search?
 
Is asynchronous import?
 
Is the current users a WCR user?
 
isRDB(theJSONValue, theProperty)
Determines if the JSON field value has the required structure for an RDB field
 
Is the current users a WCR user?
 
jsAcls(theGroup)
Builds a JS ACL object
 
jsGroup(theGroup)
Builds a js group object
 
main()
Removes old files in the restapi temp folder.
 
move(theMoveJSON)
Moves the files or folders pushes them to the response
 
pathToAssetInfo(theSource)
Adds an object containing the assetID of the src asset fo myData
 
pushAsyncUploadedAsset(theAsset, theDestination, theActionId)
Writes data to the response.
 
Writes the uploaded user to the file and adds it to the response
 
Pushes the results into the response
 
removeFiles(theParent)
Removes files > 24 hours old in aCacheFolder and deletes theParentFolder if it is empty
 
rename(theJSON)
Renames the source file or folder and pushes it into the response
 
search(theManagedFile)
Adds a result to the result array in myData
 
setDiscussion(theJSON)
Adds a discussion to the asset for the user
 
setFields(theFieldData)
writes field values for the asset
 
setXmp(theJSON)
Set the xmp for the asset.
 
typeAhead(theQuery)
Pushes the suggestions into the output object
 
uploadS3File(theUploadedFile, theDestination, theUnzip, theVersion)
Upload a single file or archive to S3
 
uploadToS3(theUploadedFile, theDestination, theUnzip, theVersion)
Perform S3 upload(s)
Field Detail
kFormatToExtensionMap
Maps conversion format to file extension.
Defined in: conversion.js.

kMimeMap
ext to mime type mapping
Defined in: REST.js.

REST
Workflow to return the assetID given the path using a REST call
Defined in: assetsByPath.js.
Method Detail
assetInfo(theAssetId)
A callback that just pushes the managed file into the response object
Defined in: assets.js.
Parameters:
theAssetId

build()
Utilities to help the /wf/restapi/v2/admin/* endpoints
Defined in: AdminUtils.js.

buildCriterion(theJSONSearch)
Builds a Boolean criterion
Defined in: search.js.
Parameters:
theJSONSearch
Returns:
BooleanCriterion

cancel(theAsset)
Cancel the check out of the asset
Defined in: checkOut.js.
Parameters:
theAsset

checkin(theDestFile, theSourceFile)
Check in the working copy as a new version of the asset.
Defined in: upload.js.
Parameters:
theDestFile
the destination file
theSourceFile
the source file

checkOut(theAsset)
Check out an asset
Defined in: checkOut.js.
Parameters:
theAsset

compressFiles(theCompressionJSON)
Compresses the assets into the named zip file in the destination folder
Defined in: compressFiles.js.
Parameters:
theCompressionJSON
{"ids": [123456,789012], "dest": "destination/path/", "name": "nameOfTheCompressed.zip"}

convert(theConversionJSON)
Submits the asset to the preview system
Defined in: conversion.js.
Parameters:
theConversionJSON
{"id":201623522,"directory":%20"destination/path/","format":%20"JPEG","destinationColorspace":%20"RGB","scale":%20"50%25x50%25","resolution":%20"300dpi"}

create(thePath)
Creates a file or folder from the path
Defined in: create.js.
Parameters:
thePath

{*} createOrUpdateGroup(theJsGroup, theGroup)
Updates teh groups settings and users. Creates a new group if theGroup is null
Defined in: groupManager.js.
Parameters:
theJsGroup
object from client
theGroup
the group to update or null if the group hasn't been created yet
Returns:
{*}

decompressFiles(theJSON)
Decompresses the file into the destination
Defined in: decompressFiles.js.
Parameters:
theJSON
{"id": 123456, "dest": "destination/path/"}

doAction(theAsset)
Either check out or cancel a check out of an asset
Defined in: checkOut.js.
Parameters:
theAsset

doS3Upload(theFile, theDestination, theIsAsyncImport, theVersion)
Performs S3 upload.
Defined in: upload.js.
Parameters:
theFile
the file to upload
theDestination
the destination folder
theIsAsyncImport
is asynchronous import
theVersion
should we create a new version?

downloadFiles(theUrls)
Downloads files by given url(s).
Defined in: upload.js.
Parameters:
theUrls
the url(s)

fileOrFolderDelete(theJSON)
Deletes the file or folder defined in theJSON
Defined in: delete.js.
Parameters:
theJSON
- {"id": 123456} or {"path": "Folder/To/Delete/"}

fileOrFolderImport(theSource)
Imports the source file or folder and pushes it to the response.
Defined in: import.js.
Parameters:
theSource
the file or folder to import (path or asset id)

{*} findAclById(theId)
Gets the acl by the id if it exists or null if it doesn't.
Defined in: aclManager.js.
Parameters:
theId
Returns:
{*}

{*} findUser(theData)
Find a user by its userId or username in the data object
Defined in: userManager.js.
Parameters:
theData
Returns:
{*}

finishUpload(theFile, theDestination, theIsAsyncImport)
Finishes the standard upload.
Defined in: upload.js.
Parameters:
theFile
the uploaded file
theDestination
the destination folder
theIsAsyncImport
is asynchronous import

folderContents(thePath)
Pushes directories to the response based upon the filters applied
Defined in: directories.js.
Parameters:
thePath

{Search} generateSearch(theJSONSearch, theQuickSearch)
returns a Search wrapper created from the JSON search object
Defined in: search.js.
Parameters:
theJSONSearch
the search object
theQuickSearch
a quicksearch to include with the search object
Returns:
{Search}

getCompletedAssets()
Gets the array of completed assets.
Defined in: getCompletedAssets.js.

getDictionary(theDictionaryName)
Gets a dictionary and a list of words and put them into myData.
Defined in: dictionary.js.
Parameters:
theDictionaryName

getDiscussion(theManagedFile)
Pushes the discussion data to the response
Defined in: getDiscussion.js.
Parameters:
theManagedFile

getFieldWrapper(theFile, theResourceWrapper, theProperty, theForcedType)
Gets a the container for the field. Either an Empty container or the container already saved to the Resource
Defined in: setFields.js.
Parameters:
theFile
the file we are dialing with
theResourceWrapper
where we are pulling the current data from
theProperty
the field we are working with
theForcedType
the type to force upon the field if the field is empty
Returns:
SeqWrapper | BagWrapper | AltWrapper | String

{*} getNewFieldValue(theFile, theResourceWrapper, theFieldJSON)
Gets a value to write to the file for the field defined in theFieldJSON
Defined in: setFields.js.
Parameters:
theFile
the asset we are currently writing to
theResourceWrapper
the resouce wrapper we should be pulling the current data from
theFieldJSON
defines the field and what we are writing { "fieldId": "http://purl.org/dc/elements/1.1/ title", "value": "A new value for Dublin Core title", "append": true } Normal container field { "fieldId": "http://purl.org/dc/elements/1.1/ title", "value": ["A new value for Dublin Core title","value2"], "append": true } Repeating data block container field { "fieldId": "http://purl.org/dc/elements/1.1/ repeating", "append": true, "value": [ [ { "fieldId": "http://purl.org/dc/elements/1.1/ blockField1", "value": "Field1 in block" }, { "fieldId": "http://purl.org/dc/elements/1.1/ blockField2", "value": "Field2 in block" } ] ] }
Returns:
{*}

{*} getParentDirectory()
The user can pass in a directoryId as the root of whatever they are creating
Defined in: create.js.
Returns:
{*}

getSavedSearches()
Gets the searches for the current user.
Defined in: savedSearches.js.

getSelections()
Gets the selection for the current user.
Defined in: savedSelections.js.

getXmp(theManagedFile)
Pushes the asset to the response with the XMP string
Defined in: getXmp.js.
Parameters:
theManagedFile

includeDirectory(aSearch, theSearchDirectory)
Adds the directory to the quickSearch
Defined in: quickSearch.js.
Parameters:
aSearch
theSearchDirectory

{string} incrementName(theParentPath, theOldName)
Used to increment files with the same name test.txt becomes test 1.txt
Defined in: upload.js.
Parameters:
theParentPath
theOldName
Returns:
{string}

isAdmin(theUser)
Does the given user have the admin rights?
Defined in: savedSearches.js.
Parameters:
theUser

isAdminSearch(theSearchName)
Is admin search?
Defined in: savedSearches.js.
Parameters:
theSearchName

isAsyncImport()
Is asynchronous import?
Defined in: upload.js.

{boolean} isBlueUser()
Is the current users a WCR user?
Defined in: userInfo.js.
Returns:
{boolean}

{boolean} isRDB(theJSONValue, theProperty)
Determines if the JSON field value has the required structure for an RDB field
Defined in: setFields.js.
Parameters:
theJSONValue
theProperty
Returns:
{boolean}

{boolean} isWCRUser()
Is the current users a WCR user?
Defined in: userInfo.js.
Returns:
{boolean}

{Array} jsAcls(theGroup)
Builds a JS ACL object
Defined in: groups.js.
Parameters:
theGroup
Returns:
{Array}

{{name: *|id: *|description: *|active: boolean|acls: Array}} jsGroup(theGroup)
Builds a js group object
Defined in: groups.js.
Parameters:
theGroup
Returns:
{{name: *|id: *|description: *|active: boolean|acls: Array}}

{string} main()
Removes old files in the restapi temp folder. Renditions/Workflows/_internal/restapi/tmp/ Called every 24 hours on a schedule Clears all tmp files if triggered manually or by REST request
Defined in: clean.js.
Returns:
{string}

move(theMoveJSON)
Moves the files or folders pushes them to the response
Defined in: move.js.
Parameters:
theMoveJSON
{"directory": "dest": } or {"id" : , "dest":}

pathToAssetInfo(theSource)
Adds an object containing the assetID of the src asset fo myData
Defined in: assetsByPath.js.
Parameters:
theSource
assetID

pushAsyncUploadedAsset(theAsset, theDestination, theActionId)
Writes data to the response.
Defined in: upload.js.
Parameters:
theAsset
the uploaded asset
theDestination
the destination folder
theActionId
the action id

pushUploadedAsset(theAsset)
Writes the uploaded user to the file and adds it to the response
Defined in: upload.js.
Parameters:
theAsset

quickSearch()
Pushes the results into the response
Defined in: quickSearch.js.

removeFiles(theParent)
Removes files > 24 hours old in aCacheFolder and deletes theParentFolder if it is empty
Defined in: clean.js.
Parameters:
theParent
Managed Folder

rename(theJSON)
Renames the source file or folder and pushes it into the response
Defined in: rename.js.
Parameters:
theJSON
{"directory":"folder/", "name": "newName"} or {"id" : 123456, "name":"newFileName.txt"}

search(theManagedFile)
Adds a result to the result array in myData
Defined in: search.js.
Parameters:
theManagedFile

setDiscussion(theJSON)
Adds a discussion to the asset for the user
Defined in: setDiscussion.js.
Parameters:
theJSON
{"id":123456,"text":"the message to add to the discussion","user":"theUserName"}

setFields(theFieldData)
writes field values for the asset
Defined in: setFields.js.
Parameters:
theFieldData
{ "id":123456, "fields: [ { "fieldId": "http://purl.org/dc/elements/1.1/ title", "value": "A new value for Dublin Core title", "append": true },... ] }

setXmp(theJSON)
Set the xmp for the asset.
Defined in: setXmp.js.
Parameters:
theJSON
{"id": , "xmp": ""}

typeAhead(theQuery)
Pushes the suggestions into the output object
Defined in: typeAhead.js.
Parameters:
theQuery

uploadS3File(theUploadedFile, theDestination, theUnzip, theVersion)
Upload a single file or archive to S3
Defined in: upload.js.
Parameters:
theUploadedFile
the file to upload
theDestination
the destination
theUnzip
should we unzip?
theVersion
should we create a new version?

uploadToS3(theUploadedFile, theDestination, theUnzip, theVersion)
Perform S3 upload(s)
Defined in: upload.js.
Parameters:
theUploadedFile
the file(s) being uploaded
theDestination
the destination folder
theUnzip
should we unzip?
theVersion
should we create a new version?

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Dec 15 2023 01:44:01 GMT-0600 (CST)