Skip to content

Commit

Permalink
fixing folder renaming issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolvin committed Oct 1, 2024
1 parent 1087631 commit 4e00e8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class BrightcoveDeleteAssetWorkflowStep implements WorkflowProcess{
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap processArguments) throws WorkflowException {
// TODO Auto-generated method stub
String payloadPath = workItem.getWorkflowData().getPayload().toString();
LOG.error("********************* payloadpath:" + payloadPath);
LOG.info("********************* payloadpath:" + payloadPath);

ResourceResolver rr = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class BrightcoveSyncAssetWorkflowStep implements WorkflowProcess{
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap processArguments) throws WorkflowException {

String payloadPath = workItem.getWorkflowData().getPayload().toString();
LOG.error("********************* payloadpath:" + payloadPath);
LOG.info("********************* payloadpath:" + payloadPath);

ResourceResolver rr = null;

Expand Down Expand Up @@ -254,10 +254,9 @@ private void syncFolder(ServiceUtil serviceUtil, JSONObject api_resp, Node asset
if (!parentNode.hasProperty("brc_folder_id")) {
String folderId = serviceUtil.createFolder(assetNode.getParent().getName());
if (folderId != null && !folderId.isEmpty()) {
parentNode.getSession().move(parentNode.getPath(), parentNode.getParent().getPath() + "/" + folderId);
parentNode.getSession().save();

parentNode.setProperty("brc_folder_id", folderId);

parentNode.getSession().save();
LOG.trace("SUBFOLDER FOUND - SETTING THE FOLDER ID to '" + folderId + "'");
serviceUtil.moveVideoToFolder(folderId, api_resp.getString(Constants.VIDEOID));
}
Expand Down

0 comments on commit 4e00e8d

Please sign in to comment.