Class LayoutSetLocalServiceUtil
com.liferay.portal.service.impl.LayoutSetLocalServiceImpl
and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LayoutSet
addLayoutSet
(long groupId, boolean privateLayout) static LayoutSet
addLayoutSet
(LayoutSet layoutSet) Adds the layout set to the database.static LayoutSet
createLayoutSet
(long layoutSetId) Creates a new layout set with the primary key.static PersistedModel
createPersistedModel
(Serializable primaryKeyObj) static LayoutSet
deleteLayoutSet
(long layoutSetId) Deletes the layout set with the primary key from the database.static void
deleteLayoutSet
(long groupId, boolean privateLayout, ServiceContext serviceContext) static LayoutSet
deleteLayoutSet
(LayoutSet layoutSet) Deletes the layout set from the database.static PersistedModel
deletePersistedModel
(PersistedModel persistedModel) static <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static DynamicQuery
static <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.static <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.static <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.static long
dynamicQueryCount
(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static long
dynamicQueryCount
(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.static LayoutSet
fetchLayoutSet
(long layoutSetId) static LayoutSet
fetchLayoutSet
(long groupId, boolean privateLayout) static LayoutSet
fetchLayoutSet
(String virtualHostname) static LayoutSet
fetchLayoutSetByLogoId
(boolean privateLayout, long logoId) static ActionableDynamicQuery
static LayoutSet
getLayoutSet
(long layoutSetId) Returns the layout set with the primary key.static LayoutSet
getLayoutSet
(long groupId, boolean privateLayout) static LayoutSet
getLayoutSet
(String virtualHostname) getLayoutSets
(int start, int end) Returns a range of all the layout sets.getLayoutSetsByLayoutSetPrototypeUuid
(String layoutSetPrototypeUuid) static int
Returns the number of layout sets.static String
Returns the OSGi service identifier.static int
getPageCount
(long groupId, boolean privateLayout) static PersistedModel
getPersistedModel
(Serializable primaryKeyObj) static LayoutSetLocalService
static void
setService
(LayoutSetLocalService service) static LayoutSet
updateFaviconFileEntryId
(long groupId, boolean privateLayout, long faviconFileEntryId) static LayoutSet
updateLayoutSet
(LayoutSet layoutSet) Updates the layout set in the database or adds it if it does not yet exist.static void
updateLayoutSetPrototypeLinkEnabled
(long groupId, boolean privateLayout, boolean layoutSetPrototypeLinkEnabled, String layoutSetPrototypeUuid) Updates the state of the layout set prototype link.static LayoutSet
updateLogo
(long groupId, boolean privateLayout, boolean hasLogo, byte[] bytes) static LayoutSet
updateLogo
(long groupId, boolean privateLayout, boolean hasLogo, File file) static LayoutSet
updateLogo
(long groupId, boolean privateLayout, boolean hasLogo, InputStream inputStream) static LayoutSet
updateLogo
(long groupId, boolean privateLayout, boolean hasLogo, InputStream inputStream, boolean cleanUpStream) static LayoutSet
updateLookAndFeel
(long groupId, boolean privateLayout, String themeId, String colorSchemeId, String css) static void
updateLookAndFeel
(long groupId, String themeId, String colorSchemeId, String css) static LayoutSet
updateSettings
(long groupId, boolean privateLayout, String settings) static LayoutSet
updateVirtualHosts
(long groupId, boolean privateLayout, TreeMap<String, String> virtualHostnames)
-
Constructor Details
-
LayoutSetLocalServiceUtil
public LayoutSetLocalServiceUtil()
-
-
Method Details
-
addLayoutSet
Adds the layout set to the database. Also notifies the appropriate model listeners.Important: Inspect LayoutSetLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
layoutSet
- the layout set- Returns:
- the layout set that was added
-
addLayoutSet
- Throws:
PortalException
-
createLayoutSet
Creates a new layout set with the primary key. Does not add the layout set to the database.- Parameters:
layoutSetId
- the primary key for the new layout set- Returns:
- the new layout set
-
createPersistedModel
public static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException - Throws:
PortalException
-
deleteLayoutSet
Deletes the layout set from the database. Also notifies the appropriate model listeners.Important: Inspect LayoutSetLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
layoutSet
- the layout set- Returns:
- the layout set that was removed
-
deleteLayoutSet
Deletes the layout set with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect LayoutSetLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
layoutSetId
- the primary key of the layout set- Returns:
- the layout set that was removed
- Throws:
PortalException
- if a layout set with the primary key could not be found
-
deleteLayoutSet
public static void deleteLayoutSet(long groupId, boolean privateLayout, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
deletePersistedModel
public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException - Throws:
PortalException
-
dslQuery
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dslQueryCount
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dynamicQuery
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
Performs a dynamic query on the database and returns a range of the matching rows.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.LayoutSetModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.LayoutSetModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchLayoutSet
-
fetchLayoutSet
-
fetchLayoutSet
-
fetchLayoutSetByLogoId
public static LayoutSet fetchLayoutSetByLogoId(boolean privateLayout, long logoId) throws PortalException - Throws:
PortalException
-
getActionableDynamicQuery
-
getIndexableActionableDynamicQuery
-
getLayoutSet
Returns the layout set with the primary key.- Parameters:
layoutSetId
- the primary key of the layout set- Returns:
- the layout set
- Throws:
PortalException
- if a layout set with the primary key could not be found
-
getLayoutSet
- Throws:
PortalException
-
getLayoutSet
- Throws:
PortalException
-
getLayoutSets
Returns a range of all the layout sets.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.LayoutSetModelImpl
.- Parameters:
start
- the lower bound of the range of layout setsend
- the upper bound of the range of layout sets (not inclusive)- Returns:
- the range of layout sets
-
getLayoutSetsByLayoutSetPrototypeUuid
-
getLayoutSetsCount
public static int getLayoutSetsCount()Returns the number of layout sets.- Returns:
- the number of layout sets
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPageCount
public static int getPageCount(long groupId, boolean privateLayout) -
getPersistedModel
- Throws:
PortalException
-
updateFaviconFileEntryId
public static LayoutSet updateFaviconFileEntryId(long groupId, boolean privateLayout, long faviconFileEntryId) throws PortalException - Throws:
PortalException
-
updateLayoutSet
Updates the layout set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect LayoutSetLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
layoutSet
- the layout set- Returns:
- the layout set that was updated
-
updateLayoutSetPrototypeLinkEnabled
public static void updateLayoutSetPrototypeLinkEnabled(long groupId, boolean privateLayout, boolean layoutSetPrototypeLinkEnabled, String layoutSetPrototypeUuid) throws PortalException Updates the state of the layout set prototype link.- Parameters:
groupId
- the primary key of the groupprivateLayout
- whether the layout set is private to the grouplayoutSetPrototypeLinkEnabled
- whether the layout set prototype is link enabledlayoutSetPrototypeUuid
- the uuid of the layout set prototype to link with- Throws:
PortalException
-
updateLogo
public static LayoutSet updateLogo(long groupId, boolean privateLayout, boolean hasLogo, byte[] bytes) throws PortalException - Throws:
PortalException
-
updateLogo
public static LayoutSet updateLogo(long groupId, boolean privateLayout, boolean hasLogo, File file) throws PortalException - Throws:
PortalException
-
updateLogo
public static LayoutSet updateLogo(long groupId, boolean privateLayout, boolean hasLogo, InputStream inputStream) throws PortalException - Throws:
PortalException
-
updateLogo
public static LayoutSet updateLogo(long groupId, boolean privateLayout, boolean hasLogo, InputStream inputStream, boolean cleanUpStream) throws PortalException - Throws:
PortalException
-
updateLookAndFeel
public static LayoutSet updateLookAndFeel(long groupId, boolean privateLayout, String themeId, String colorSchemeId, String css) throws PortalException - Throws:
PortalException
-
updateLookAndFeel
public static void updateLookAndFeel(long groupId, String themeId, String colorSchemeId, String css) throws PortalException - Throws:
PortalException
-
updateSettings
public static LayoutSet updateSettings(long groupId, boolean privateLayout, String settings) throws PortalException - Throws:
PortalException
-
updateVirtualHosts
public static LayoutSet updateVirtualHosts(long groupId, boolean privateLayout, TreeMap<String, String> virtualHostnames) throws PortalException- Throws:
PortalException
-
getService
-
setService
-