Skip to content
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

Lpd 35068 4 #6082

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public void testStyleBookEntry() throws Exception {
_styleBookEntryLocalService.addStyleBookEntry(
null, TestPropsValues.getUserId(), stagingGroup.getGroupId(),
false, StringPool.BLANK, RandomTestUtil.randomString(),
StringPool.BLANK,
StringPool.BLANK, RandomTestUtil.randomString(),
ServiceContextTestUtil.getServiceContext(
stagingGroup.getGroupId()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public void testEditLayoutDesignDoesntChangeWithNotEditedValues()
_styleBookEntryLocalService.addStyleBookEntry(
null, TestPropsValues.getUserId(), _group.getGroupId(), false,
StringPool.BLANK, RandomTestUtil.randomString(),
StringPool.BLANK, serviceContext);
StringPool.BLANK, RandomTestUtil.randomString(),
serviceContext);

FileEntry fileEntry = _dlAppLocalService.addFileEntry(
null, TestPropsValues.getUserId(), _group.getGroupId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void testCreateLayoutPageTemplateEntry() throws Exception {
_styleBookEntryLocalService.addStyleBookEntry(
null, TestPropsValues.getUserId(), _group.getGroupId(), false,
StringPool.BLANK, RandomTestUtil.randomString(),
StringPool.BLANK,
StringPool.BLANK, RandomTestUtil.randomString(),
ServiceContextTestUtil.getServiceContext(_group.getGroupId()));

draftLayout = _layoutLocalService.updateStyleBookEntryId(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ public void testUpdateLayoutPageTemplateEntryName() throws Exception {
_styleBookEntryLocalService.addStyleBookEntry(
null, TestPropsValues.getUserId(), _group.getGroupId(), false,
StringPool.BLANK, RandomTestUtil.randomString(),
StringPool.BLANK, _serviceContext);
StringPool.BLANK, RandomTestUtil.randomString(),
_serviceContext);

Layout layout = _layoutLocalService.fetchLayout(
layoutPageTemplateEntry.getPlid());
Expand Down
2 changes: 1 addition & 1 deletion modules/apps/style-book/style-book-api/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Bundle-Name: Liferay Style Book API
Bundle-SymbolicName: com.liferay.style.book.api
Bundle-Version: 8.0.1
Bundle-Version: 9.0.0
Export-Package:\
com.liferay.style.book.constants,\
com.liferay.style.book.exception,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,21 @@ public interface StyleBookEntryModel
*/
public void setStyleBookEntryKey(String styleBookEntryKey);

/**
* Returns the theme ID of this style book entry.
*
* @return the theme ID of this style book entry
*/
@AutoEscape
public String getThemeId();

/**
* Sets the theme ID of this style book entry.
*
* @param themeId the theme ID of this style book entry
*/
public void setThemeId(String themeId);

@Override
public StyleBookEntry cloneWithOriginalValues();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public class StyleBookEntryTable extends BaseTable<StyleBookEntryTable> {
createColumn(
"styleBookEntryKey", String.class, Types.VARCHAR,
Column.FLAG_DEFAULT);
public final Column<StyleBookEntryTable, String> themeId = createColumn(
"themeId", String.class, Types.VARCHAR, Column.FLAG_DEFAULT);

private StyleBookEntryTable() {
super("StyleBookEntry", StyleBookEntryTable::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,21 @@ public interface StyleBookEntryVersionModel
*/
public void setStyleBookEntryKey(String styleBookEntryKey);

/**
* Returns the theme ID of this style book entry version.
*
* @return the theme ID of this style book entry version
*/
@AutoEscape
public String getThemeId();

/**
* Sets the theme ID of this style book entry version.
*
* @param themeId the theme ID of this style book entry version
*/
public void setThemeId(String themeId);

@Override
public StyleBookEntryVersion cloneWithOriginalValues();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public class StyleBookEntryVersionTable
createColumn(
"styleBookEntryKey", String.class, Types.VARCHAR,
Column.FLAG_DEFAULT);
public final Column<StyleBookEntryVersionTable, String> themeId =
createColumn(
"themeId", String.class, Types.VARCHAR, Column.FLAG_DEFAULT);

private StyleBookEntryVersionTable() {
super("StyleBookEntryVersion", StyleBookEntryVersionTable::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public Map<String, Object> getModelAttributes() {
attributes.put("name", getName());
attributes.put("previewFileEntryId", getPreviewFileEntryId());
attributes.put("styleBookEntryKey", getStyleBookEntryKey());
attributes.put("themeId", getThemeId());

return attributes;
}
Expand Down Expand Up @@ -172,6 +173,12 @@ public void setModelAttributes(Map<String, Object> attributes) {
if (styleBookEntryKey != null) {
setStyleBookEntryKey(styleBookEntryKey);
}

String themeId = (String)attributes.get("themeId");

if (themeId != null) {
setThemeId(themeId);
}
}

@Override
Expand Down Expand Up @@ -329,6 +336,16 @@ public long getStyleBookEntryVersionId() {
return model.getStyleBookEntryVersionId();
}

/**
* Returns the theme ID of this style book entry version.
*
* @return the theme ID of this style book entry version
*/
@Override
public String getThemeId() {
return model.getThemeId();
}

/**
* Returns the user ID of this style book entry version.
*
Expand Down Expand Up @@ -539,6 +556,16 @@ public void setStyleBookEntryVersionId(long styleBookEntryVersionId) {
model.setStyleBookEntryVersionId(styleBookEntryVersionId);
}

/**
* Sets the theme ID of this style book entry version.
*
* @param themeId the theme ID of this style book entry version
*/
@Override
public void setThemeId(String themeId) {
model.setThemeId(themeId);
}

/**
* Sets the user ID of this style book entry version.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public Map<String, Object> getModelAttributes() {
attributes.put("name", getName());
attributes.put("previewFileEntryId", getPreviewFileEntryId());
attributes.put("styleBookEntryKey", getStyleBookEntryKey());
attributes.put("themeId", getThemeId());

return attributes;
}
Expand Down Expand Up @@ -163,6 +164,12 @@ public void setModelAttributes(Map<String, Object> attributes) {
if (styleBookEntryKey != null) {
setStyleBookEntryKey(styleBookEntryKey);
}

String themeId = (String)attributes.get("themeId");

if (themeId != null) {
setThemeId(themeId);
}
}

@Override
Expand Down Expand Up @@ -327,6 +334,16 @@ public String getStyleBookEntryKey() {
return model.getStyleBookEntryKey();
}

/**
* Returns the theme ID of this style book entry.
*
* @return the theme ID of this style book entry
*/
@Override
public String getThemeId() {
return model.getThemeId();
}

/**
* Returns the user ID of this style book entry.
*
Expand Down Expand Up @@ -540,6 +557,16 @@ public void setStyleBookEntryKey(String styleBookEntryKey) {
model.setStyleBookEntryKey(styleBookEntryKey);
}

/**
* Sets the theme ID of this style book entry.
*
* @param themeId the theme ID of this style book entry
*/
@Override
public void setThemeId(String themeId) {
model.setThemeId(themeId);
}

/**
* Sets the user ID of this style book entry.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public interface StyleBookEntryLocalService
public StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long userId, long groupId,
boolean defaultStyleBookEntry, String frontendTokensValues,
String name, String styleBookEntryKey,
String name, String styleBookEntryKey, String themeId,
ServiceContext serviceContext)
throws PortalException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ public class StyleBookEntryLocalServiceUtil {
public static StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long userId, long groupId,
boolean defaultStyleBookEntry, String frontendTokensValues,
String name, String styleBookEntryKey,
String name, String styleBookEntryKey, String themeId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws PortalException {

return getService().addStyleBookEntry(
externalReferenceCode, userId, groupId, defaultStyleBookEntry,
frontendTokensValues, name, styleBookEntryKey, serviceContext);
frontendTokensValues, name, styleBookEntryKey, themeId,
serviceContext);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ public StyleBookEntryLocalServiceWrapper(
public StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long userId, long groupId,
boolean defaultStyleBookEntry, String frontendTokensValues,
String name, String styleBookEntryKey,
String name, String styleBookEntryKey, String themeId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {

return _styleBookEntryLocalService.addStyleBookEntry(
externalReferenceCode, userId, groupId, defaultStyleBookEntry,
frontendTokensValues, name, styleBookEntryKey, serviceContext);
frontendTokensValues, name, styleBookEntryKey, themeId,
serviceContext);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ public interface StyleBookEntryService extends BaseService {
*/
public StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long groupId, String name,
String styleBookEntryKey, ServiceContext serviceContext)
String styleBookEntryKey, String themeId,
ServiceContext serviceContext)
throws PortalException;

public StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long groupId,
String frontendTokensValues, String name, String styleBookEntryKey,
ServiceContext serviceContext)
String themeId, ServiceContext serviceContext)
throws PortalException;

public StyleBookEntry copyStyleBookEntry(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,25 @@ public class StyleBookEntryServiceUtil {
*/
public static StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long groupId, String name,
String styleBookEntryKey,
String styleBookEntryKey, String themeId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws PortalException {

return getService().addStyleBookEntry(
externalReferenceCode, groupId, name, styleBookEntryKey,
externalReferenceCode, groupId, name, styleBookEntryKey, themeId,
serviceContext);
}

public static StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long groupId,
String frontendTokensValues, String name, String styleBookEntryKey,
String themeId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws PortalException {

return getService().addStyleBookEntry(
externalReferenceCode, groupId, frontendTokensValues, name,
styleBookEntryKey, serviceContext);
styleBookEntryKey, themeId, serviceContext);
}

public static StyleBookEntry copyStyleBookEntry(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,26 @@ public StyleBookEntryServiceWrapper(
@Override
public StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long groupId, String name,
String styleBookEntryKey,
String styleBookEntryKey, String themeId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {

return _styleBookEntryService.addStyleBookEntry(
externalReferenceCode, groupId, name, styleBookEntryKey,
externalReferenceCode, groupId, name, styleBookEntryKey, themeId,
serviceContext);
}

@Override
public StyleBookEntry addStyleBookEntry(
String externalReferenceCode, long groupId,
String frontendTokensValues, String name, String styleBookEntryKey,
String themeId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException {

return _styleBookEntryService.addStyleBookEntry(
externalReferenceCode, groupId, frontendTokensValues, name,
styleBookEntryKey, serviceContext);
styleBookEntryKey, themeId, serviceContext);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version 2.2.0
version 2.3.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version 4.0.0
version 5.0.0
2 changes: 1 addition & 1 deletion modules/apps/style-book/style-book-service/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Bundle-Name: Liferay Style Book Service
Bundle-SymbolicName: com.liferay.style.book.service
Bundle-Version: 2.0.51
Liferay-Require-SchemaVersion: 1.5.0
Liferay-Require-SchemaVersion: 1.7.0
Liferay-Service: true
-dsannotations-options: inherit
1 change: 1 addition & 0 deletions modules/apps/style-book/style-book-service/service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<column name="name" type="String" />
<column name="previewFileEntryId" type="long" />
<column name="styleBookEntryKey" type="String" />
<column name="themeId" type="String" />

<!-- Order -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public StyleBookEntry addStagedModel(
styleBookEntry.getGroupId(),
styleBookEntry.isDefaultStyleBookEntry(),
styleBookEntry.getFrontendTokensValues(), styleBookEntry.getName(),
styleBookEntry.getStyleBookEntryKey(), serviceContext);
styleBookEntry.getStyleBookEntryKey(), styleBookEntry.getThemeId(),
serviceContext);
}

@Override
Expand Down
Loading