Skip to content

Commit

Permalink
LPS-138717 Inline
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchandotcom committed Sep 24, 2021
1 parent a4eea2d commit 8682547
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,11 @@ private ServiceRegistration<Portlet> _registerPortlet(
String customElementCSSURLs =
remoteAppEntry.getCustomElementCSSURLs();

String[] customElementCSSURLsArray = null;

if (!customElementCSSURLs.isEmpty()) {
customElementCSSURLsArray = customElementCSSURLs.split(
StringPool.NEW_LINE);
if (Validator.isNotNull(customElementCSSURLs)) {
dictionary.put(
"com.liferay.portlet.header-portlet-css",
customElementCSSURLs.split(StringPool.NEW_LINE));
}

dictionary.put(
"com.liferay.portlet.header-portlet-css",
customElementCSSURLsArray);
}
else if (Objects.equals(
remoteAppEntry.getType(), RemoteAppConstants.TYPE_IFRAME)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,17 @@ private void _add(ActionRequest actionRequest) throws PortalException {
String type = ParamUtil.getString(actionRequest, "type");

if (type.equals(RemoteAppConstants.TYPE_CUSTOM_ELEMENT)) {
String[] customElementCSSURLs = ParamUtil.getStringValues(
actionRequest, "customElementCSSURLs");
String[] customElementURLs = ParamUtil.getStringValues(
actionRequest, "customElementURLs");

_remoteAppEntryService.addCustomElementRemoteAppEntry(
StringUtil.merge(customElementCSSURLs, StringPool.NEW_LINE),
StringUtil.merge(
ParamUtil.getStringValues(
actionRequest, "customElementCSSURLs"),
StringPool.NEW_LINE),
ParamUtil.getString(
actionRequest, "customElementHTMLElementName"),
StringUtil.merge(customElementURLs, StringPool.NEW_LINE),
StringUtil.merge(
ParamUtil.getStringValues(
actionRequest, "customElementURLs"),
StringPool.NEW_LINE),
nameMap, portletCategoryName,
ParamUtil.getString(actionRequest, "properties"));
}
Expand Down Expand Up @@ -142,17 +143,18 @@ private void _update(ActionRequest actionRequest) throws PortalException {
remoteAppEntry.getType(),
RemoteAppConstants.TYPE_CUSTOM_ELEMENT)) {

String[] customElementCSSURLs = ParamUtil.getStringValues(
actionRequest, "customElementCSSURLs");
String[] customElementURLs = ParamUtil.getStringValues(
actionRequest, "customElementURLs");

_remoteAppEntryService.updateCustomElementRemoteAppEntry(
remoteAppEntry.getRemoteAppEntryId(),
StringUtil.merge(customElementCSSURLs, StringPool.NEW_LINE),
StringUtil.merge(
ParamUtil.getStringValues(
actionRequest, "customElementCSSURLs"),
StringPool.NEW_LINE),
ParamUtil.getString(
actionRequest, "customElementHTMLElementName"),
StringUtil.merge(customElementURLs, StringPool.NEW_LINE),
StringUtil.merge(
ParamUtil.getStringValues(
actionRequest, "customElementURLs"),
StringPool.NEW_LINE),
nameMap, portletCategoryName,
ParamUtil.getString(actionRequest, "properties"));
}
Expand Down

0 comments on commit 8682547

Please sign in to comment.