Package lumis.service.tagmanager.util
Class TagManagerUtil
- java.lang.Object
-
- lumis.service.tagmanager.util.TagManagerUtil
-
public class TagManagerUtil extends Object
Tag Manager utilities.- Since:
- 14.0.0
- Version:
- $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TagManagerUtil.NoProjectException
Exception thrown when a tag manager service instance does not belong to a project.static class
TagManagerUtil.NoWebsiteException
Exception thrown when a tag manager service instance does not belong to a website.
-
Constructor Summary
Constructors Constructor Description TagManagerUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getHtmlCodeSnippet(ServiceInstanceConfig serviceInstanceConfig)
Returns the HTML snippet to inject tag manager script.static Date
getLastModifiedItemDate(ServiceInstanceConfig serviceInstanceConfig)
Returns the last modified date time of the contents of the given service instance.static IFile
getSecondScriptFile(ServiceInstanceConfig serviceInstanceConfig)
Returns theltmimpl.js
file.static String
getSecondScriptText(ServiceInstanceConfig serviceInstanceConfig)
Returns the content forltmimpl.js
script.static void
publish(ServiceInstanceConfig serviceInstanceConfig)
Publishes the script files.static void
tryToDeleteScripts(ServiceInstanceConfig sic)
Tries to delete scripts folder
-
-
-
Field Detail
-
LOGGER
public static final ILogger LOGGER
This class' logger.- Since:
- 14.0.0
-
-
Method Detail
-
getSecondScriptText
public static String getSecondScriptText(ServiceInstanceConfig serviceInstanceConfig) throws PortalException, TagManagerUtil.NoProjectException, TagManagerUtil.NoWebsiteException
Returns the content forltmimpl.js
script.- Parameters:
serviceInstanceConfig
- the service instance config- Returns:
- the content for
ltmimpl.js
script. - Throws:
PortalException
TagManagerUtil.NoProjectException
TagManagerUtil.NoWebsiteException
- Since:
- 14.0.0
-
getSecondScriptFile
public static IFile getSecondScriptFile(ServiceInstanceConfig serviceInstanceConfig) throws PortalException, TagManagerUtil.NoWebsiteException
Returns theltmimpl.js
file.- Parameters:
serviceInstanceConfig
- the service instance config- Returns:
- the
ltmimpl.js
file. - Throws:
PortalException
TagManagerUtil.NoWebsiteException
- Since:
- 14.0.0
-
getLastModifiedItemDate
public static Date getLastModifiedItemDate(ServiceInstanceConfig serviceInstanceConfig)
Returns the last modified date time of the contents of the given service instance.- Parameters:
serviceInstanceConfig
- the service instance config- Returns:
- the last modified date time of the contents of the given service instance.
- Since:
- 14.0.0
-
publish
public static void publish(ServiceInstanceConfig serviceInstanceConfig) throws PortalException, TagManagerUtil.NoProjectException, TagManagerUtil.NoWebsiteException
Publishes the script files.- Parameters:
serviceInstanceConfig
- the service instance config- Throws:
PortalException
TagManagerUtil.NoProjectException
TagManagerUtil.NoWebsiteException
- Since:
- 14.0.0
-
getHtmlCodeSnippet
public static String getHtmlCodeSnippet(ServiceInstanceConfig serviceInstanceConfig) throws PortalException, TagManagerUtil.NoProjectException, TagManagerUtil.NoWebsiteException
Returns the HTML snippet to inject tag manager script.- Parameters:
serviceInstanceConfig
- the service instance config- Returns:
- the HTML snippet to inject tag manager script.
- Throws:
PortalException
TagManagerUtil.NoProjectException
TagManagerUtil.NoWebsiteException
- Since:
- 14.0.0
-
tryToDeleteScripts
public static void tryToDeleteScripts(ServiceInstanceConfig sic) throws PortalException
Tries to delete scripts folder- Parameters:
sic
- the service instance- Throws:
PortalException
- Since:
- 14.0.0
-
-