-
Notifications
You must be signed in to change notification settings - Fork 0
Import file API #14
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
base: master
Are you sure you want to change the base?
Import file API #14
Conversation
|
Can one of the admins verify this patch? |
…m a given URL and commits it.
src/main/java/se/simonsoft/cms/transform/rest/TransformResource.java
Outdated
Show resolved
Hide resolved
src/main/java/se/simonsoft/cms/transform/rest/TransformResource.java
Outdated
Show resolved
Hide resolved
src/main/java/se/simonsoft/cms/transform/rest/TransformResource.java
Outdated
Show resolved
Hide resolved
src/main/java/se/simonsoft/cms/transform/service/TransformServiceXsl.java
Outdated
Show resolved
Hide resolved
src/main/java/se/simonsoft/cms/transform/service/TransformServiceXsl.java
Outdated
Show resolved
Hide resolved
src/main/java/se/simonsoft/cms/transform/rest/TransformResource.java
Outdated
Show resolved
Hide resolved
src/main/java/se/simonsoft/cms/transform/rest/TransformResource.java
Outdated
Show resolved
Hide resolved
src/main/java/se/simonsoft/cms/transform/service/TransformServiceXsl.java
Outdated
Show resolved
Hide resolved
…ort for importing content alongside url.
| final CmsItem location = itemLookup.getItem(repository.getItemId(relPath, null)); | ||
| final CmsItemProperties locationProps = location.getProperties(); | ||
| final boolean isShardParent = isCmsClass(locationProps, CMS_CLASS_SHARDPARENT); | ||
| final boolean hasNamePattern = locationProps.containsProperty(PROPNAME_CONFIG_ITEMNAMEPATTERN); |
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.
If isShardParent, then we can require hasNamePattern.
Error message from cms-fonto:
if (!locationProps.containsProperty(PROPNAME_CONFIG_ITEMNAMEPATTERN)) {
String msg = MessageFormatter.format("Location does not define a name pattern: {}", parentFolder).getMessage();
logger.error(msg);
throw new IllegalArgumentException(msg);
}
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.
Simplifies the code below.
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.
Better?
takesson
left a comment
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.
One small change.
| final CmsItem location = itemLookup.getItem(repository.getItemId(relPath, null)); | ||
| final CmsItemProperties locationProps = location.getProperties(); | ||
| final boolean isShardParent = isCmsClass(locationProps, CMS_CLASS_SHARDPARENT); | ||
| final boolean hasNamePattern = locationProps.containsProperty(PROPNAME_CONFIG_ITEMNAMEPATTERN); |
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.
Simplifies the code below.
Resolves: https://pds-svn-gbg.pdsvision.net/trac/SubversionCMS/ticket/1861
Task: https://simonsoft.slack.com/lists/T04L7JSEC/F07PTMY5G6P?record_id=Rec092VEJLABZ