New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy Mediapackage elements from the publication to mediapackage #3554
Copy Mediapackage elements from the publication to mediapackage #3554
Conversation
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick initial review. Did not test this yet.
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
.forEach(element -> tracks.add(element)); | ||
Arrays.stream(publication.get().getTracks()) | ||
.filter(element -> configuredSourceFlavors.contains(element.getFlavor())) | ||
.filter(Objects::nonNull) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
.filter(Objects::nonNull) |
.filter(Objects::nonNull) | ||
.forEach(element -> catalogs.add(element)); | ||
|
||
catalogs.stream().forEach(mediaPackageElement -> mediaPackageElement.addTag(configuredTargetTagsAsString)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
...c/main/java/org/opencastproject/workflow/handler/workflow/PublicationChannelToWorkspace.java
Outdated
Show resolved
Hide resolved
Collection<MediaPackageElement> catalogs = new ArrayList<MediaPackageElement>(); | ||
Arrays.stream(publication.get().getCatalogs()) | ||
.filter(element -> element.containsTag(configuredSourceTags)) | ||
.filter(Objects::nonNull) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
.forEach(element -> catalogs.add(element)); | ||
Arrays.stream(publication.get().getCatalogs()) | ||
.filter(element -> configuredSourceFlavors.contains(element.getFlavor())) | ||
.filter(Objects::nonNull) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. Besides the Ojects:nonNull.
I adapted your comments.
7ef5726
to
ed0e3b1
Compare
I did a rebase, now Workflow-tests does not fail any more. |
…blication channel to the mediapackage.
tags ar added one by one not as complete string
ed0e3b1
to
b6a523e
Compare
I said I'd review this, but for whatever reason my Opencast can't find the workflow handler, so I can't really test. Code seems fine though. |
The test failures are likely due to the tests which were broken a few weeks ago. Likely just rebasing or merging the current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, managed to get my Opencast working and now this operation works as advertised.
Still wondering why the .filter(Objects::nonNull)
checks are required, but I guess they don't hurt.
The suggestions below are just spelling fixes.
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
docs/guides/admin/docs/workflowoperationhandlers/publication-to-workspace-woh.md
Outdated
Show resolved
Hide resolved
…o-workspace-woh.md Co-authored-by: Arne Wilken <Arnei@users.noreply.github.com>
…o-workspace-woh.md Co-authored-by: Arne Wilken <Arnei@users.noreply.github.com>
…o-workspace-woh.md Co-authored-by: Arne Wilken <Arnei@users.noreply.github.com>
This adds pull request #3554 which got merged in last minute.
This adds pull request #3554 which got merged in last minute.
Since OC11 all publicationchannel metadata ist also stored in the mediapackage.
With this pr it is possible to copy this information from a selected
publication channel to the mediapackage in the workspace.
So it is possible to pull Publication elements to the archive.
You can clone/export/manipulate plublished material without reencoding.
Steps to do in the Workflow for example:
-> select elements by tags or flavors
-> tag elements as archive
-> download these elements to workspace
-> archive the elements
What is not implemented
Im not sure, when i would have time to do this last steps.
If someone want`s it in as it is, feel free to merge.