info.magnolia.module.templatingkit.util
Class STKUtil

java.lang.Object
  extended by info.magnolia.module.templatingkit.util.STKUtil

Deprecated. since 2.0 - use STKTemplatingFunctions instead.

public class STKUtil
extends Object

Set of static util that are about to be replaced.

Version:
$Id$

Nested Class Summary
static class STKUtil.PrivilegedOperation
          Deprecated. Operation passed to doPrivileged(Content, PrivilegedOperation).
 
Field Summary
static STKUtil INSTANCE
          Deprecated.  
static String JAVASCRIPT_RESOURCES_ALL_PATH
          Deprecated.  
static String JAVASCRIPT_RESOURCES_PATH
          Deprecated.  
 
Constructor Summary
STKUtil()
          Deprecated.  
 
Method Summary
static String abbreviateString(String stringToCut, int size)
          Deprecated.  
static String abbreviateString(String stringToCut, int size, String closureString)
          Deprecated.  
static String asStringList(List<ParagraphConfig> paragraphs)
          Deprecated.  
static Collection<info.magnolia.cms.core.Content> collectContentByUsingInheritance(info.magnolia.cms.core.Content content, String name)
          Deprecated.  
static int count(String name)
          Deprecated. Increases the context bound counter and returns the value.
static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData)
          Deprecated.  
static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData, info.magnolia.module.templating.RenderingModelImpl model)
          Deprecated.  
static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData, String variationName)
          Deprecated.  
static boolean currentUserHasOneRole(Collection<String> requiredRoles)
          Deprecated.  
static List<info.magnolia.cms.core.Content> cutList(List<info.magnolia.cms.core.Content> itemsList, int maxResults)
          Deprecated.  
static info.magnolia.cms.core.Content decode(info.magnolia.cms.core.Content content)
          Deprecated. Since Magnolia 4.4/STK 1.4 use info.magnolia.module.templating.MagnoliaTemplatingUtilities.decode
static void doPrivileged(info.magnolia.cms.core.Content content, STKUtil.PrivilegedOperation privilegedOperation)
          Deprecated. Retrieves the content from the system context, calls STKUtil.PrivilegedOperation.exec(Content), and refreshes the passed content.
static info.magnolia.cms.core.Content encode(info.magnolia.cms.core.Content content)
          Deprecated. Since Magnolia 4.4/STK 1.4 use info.magnolia.module.templating.MagnoliaTemplatingUtilities.encode
static List<String> getAllowedComponents(info.magnolia.rendering.template.AreaDefinition area)
          Deprecated.  
static List<String> getAllowedParagraphs(Area area)
          Deprecated. since 2.0, replaced by getAllowedComponents(AreaDefinition)
static Asset getAsset(info.magnolia.cms.core.Content content, String nodeDataPrefix)
          Deprecated.  
static Asset getAsset(info.magnolia.cms.core.Content content, String nodeDataPrefix, String variationName)
          Deprecated.  
static String getAssetLink(info.magnolia.cms.core.Content content, String nodeDataPrefix)
          Deprecated.  
static String getAssetLink(info.magnolia.cms.core.Content content, String nodeDataPrefix, info.magnolia.module.templating.RenderingModelImpl model)
          Deprecated.  
static String getAssetLink(info.magnolia.cms.core.Content content, String nodeDataPrefix, String variationName)
          Deprecated.  
static Asset getAssetVariation(Asset original, String variationName)
          Deprecated. Deprecated since 2.0 - use STKTemplatingFunctions instead.
static info.magnolia.cms.core.Content getContentByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot, String category, String subCategory)
          Deprecated.  
static List<info.magnolia.cms.core.Content> getContentListByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot, String category, String subCategory)
          Deprecated.  
static List<info.magnolia.cms.core.Content> getContentListByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot, String category, String subCategory, int maxResultSize, String andClause, String orderBy)
          Deprecated. FIXME commented out code: switch of RD from Template to ConfiguredTemplateDefinition makes this code unrunable.
static List<info.magnolia.cms.core.Content> getContentListByTemplateName(info.magnolia.cms.core.Content searchRoot, String templateName)
          Deprecated.  
static List<info.magnolia.cms.core.Content> getContentListByTemplateName(info.magnolia.cms.core.Content searchRoot, String templateName, int maxResultSize, String andClause, String orderByClause)
          Deprecated.  
static List<info.magnolia.cms.core.Content> getContentListByTemplateNames(info.magnolia.cms.core.Content searchRoot, Set<String> templateNames, int maxResultSize, String andClause, String orderByClause)
          Deprecated. Find content objects with one of the given templates below a given search root.
static String getDivIdAbbreviation(String divID)
          Deprecated.  
static String getDivIdAbbreviation(String divID, String delimiter)
          Deprecated.  
static String getExternalLink(info.magnolia.cms.core.Content content, String linkNodeName)
          Deprecated.  
static String getExternalLinkTitle(info.magnolia.cms.core.Content content, String linkNodeName, String linkTitleNodeName)
          Deprecated.  
protected static STKTemplatingFunctions getFunctions()
          Deprecated.  
static info.magnolia.cms.core.Content getNearestContentByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot, String category, String subCategory, info.magnolia.cms.core.Content current)
          Deprecated.  
static info.magnolia.cms.core.Content getOrCreatePrivileged(info.magnolia.cms.core.Content parent, String name, info.magnolia.cms.core.ItemType type)
          Deprecated. If the content doesn't exist doPrivileged(Content, PrivilegedOperation) is used to create the node.
static info.magnolia.cms.core.Content getReferencedContent(info.magnolia.cms.core.Content contentNode, String nodeDataName, String referencedRepository)
          Deprecated. Returns a content object which is referenced with a string uuid stored in a nodedata.
static Site getSite()
          Deprecated.  
static Site getSite(info.magnolia.cms.core.Content content)
          Deprecated. BEWARE! this method will resolve site based on content hierarchy rather then based on the current domain hence it should be used when the site need to be resolved explicitly in relation to the content with disrespect to what configuration is available in current context.
static Collection<String> getTemplatesCategories()
          Deprecated. FIXME commented out code: switch of RD from Template to ConfiguredTemplateDefinition makes this code unrunable.
static InheritedContentModel inheritContent(info.magnolia.cms.core.Content content, String name)
          Deprecated.  
static boolean isChildOf(info.magnolia.cms.core.Content parent, info.magnolia.cms.core.Content child)
          Deprecated.  
static String resolveImageVariationName(info.magnolia.module.templating.RenderingModelImpl model)
          Deprecated.  
static info.magnolia.cms.core.Content wrap(info.magnolia.cms.core.Content content)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final STKUtil INSTANCE
Deprecated. 

JAVASCRIPT_RESOURCES_PATH

public static final String JAVASCRIPT_RESOURCES_PATH
Deprecated. 
See Also:
Constant Field Values

JAVASCRIPT_RESOURCES_ALL_PATH

public static final String JAVASCRIPT_RESOURCES_ALL_PATH
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

STKUtil

public STKUtil()
Deprecated. 
Method Detail

getFunctions

protected static STKTemplatingFunctions getFunctions()
Deprecated. 

getAssetVariation

public static Asset getAssetVariation(Asset original,
                                      String variationName)
Deprecated. 
Deprecated since 2.0 - use STKTemplatingFunctions instead.


getAsset

public static Asset getAsset(info.magnolia.cms.core.Content content,
                             String nodeDataPrefix)
Deprecated. 

getAsset

public static Asset getAsset(info.magnolia.cms.core.Content content,
                             String nodeDataPrefix,
                             String variationName)
Deprecated. 

getAssetLink

public static String getAssetLink(info.magnolia.cms.core.Content content,
                                  String nodeDataPrefix)
Deprecated. 

getAssetLink

public static String getAssetLink(info.magnolia.cms.core.Content content,
                                  String nodeDataPrefix,
                                  info.magnolia.module.templating.RenderingModelImpl model)
Deprecated. 

getAssetLink

public static String getAssetLink(info.magnolia.cms.core.Content content,
                                  String nodeDataPrefix,
                                  String variationName)
Deprecated. 

createImageLink

public static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData)
Deprecated. 

createImageLink

public static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData,
                                     info.magnolia.module.templating.RenderingModelImpl model)
Deprecated. 

resolveImageVariationName

public static String resolveImageVariationName(info.magnolia.module.templating.RenderingModelImpl model)
Deprecated. 

createImageLink

public static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData,
                                     String variationName)
Deprecated. 

inheritContent

public static InheritedContentModel inheritContent(info.magnolia.cms.core.Content content,
                                                   String name)
                                            throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

collectContentByUsingInheritance

public static Collection<info.magnolia.cms.core.Content> collectContentByUsingInheritance(info.magnolia.cms.core.Content content,
                                                                                          String name)
                                                                                   throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

isChildOf

public static boolean isChildOf(info.magnolia.cms.core.Content parent,
                                info.magnolia.cms.core.Content child)
Deprecated. 

getExternalLink

public static String getExternalLink(info.magnolia.cms.core.Content content,
                                     String linkNodeName)
Deprecated. 
Returns:
The external link prepended with http:// in case the protocol is missing or an empty String if the link does not exist.

getExternalLinkTitle

public static String getExternalLinkTitle(info.magnolia.cms.core.Content content,
                                          String linkNodeName,
                                          String linkTitleNodeName)
Deprecated. 

abbreviateString

public static String abbreviateString(String stringToCut,
                                      int size)
Deprecated. 

abbreviateString

public static String abbreviateString(String stringToCut,
                                      int size,
                                      String closureString)
Deprecated. 

asStringList

public static String asStringList(List<ParagraphConfig> paragraphs)
Deprecated. 

getAllowedParagraphs

public static List<String> getAllowedParagraphs(Area area)
Deprecated. since 2.0, replaced by getAllowedComponents(AreaDefinition)

Returns the list of paragraph (as Strings representing the paragraph definition names) allowed for a given Area. If the ParagraphConfig instances set for this area defines roles, this method checks the current users' roles, and only allows paragraphs for which the user has at least one of the required roles.


getAllowedComponents

public static List<String> getAllowedComponents(info.magnolia.rendering.template.AreaDefinition area)
Deprecated. 

currentUserHasOneRole

public static boolean currentUserHasOneRole(Collection<String> requiredRoles)
Deprecated. 

getReferencedContent

public static info.magnolia.cms.core.Content getReferencedContent(info.magnolia.cms.core.Content contentNode,
                                                                  String nodeDataName,
                                                                  String referencedRepository)
Deprecated. 
Returns a content object which is referenced with a string uuid stored in a nodedata.

Parameters:
contentNode - the node with a nodedata containing a uuid
nodeDataName - the name of the nodedata which contains the uuid as a string
referencedRepository - the repository in which the referenced node exists
Returns:
the referenced node

getContentListByTemplateName

public static List<info.magnolia.cms.core.Content> getContentListByTemplateName(info.magnolia.cms.core.Content searchRoot,
                                                                                String templateName)
                                                                         throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

getContentListByTemplateName

public static List<info.magnolia.cms.core.Content> getContentListByTemplateName(info.magnolia.cms.core.Content searchRoot,
                                                                                String templateName,
                                                                                int maxResultSize,
                                                                                String andClause,
                                                                                String orderByClause)
                                                                         throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

getContentListByTemplateNames

public static List<info.magnolia.cms.core.Content> getContentListByTemplateNames(info.magnolia.cms.core.Content searchRoot,
                                                                                 Set<String> templateNames,
                                                                                 int maxResultSize,
                                                                                 String andClause,
                                                                                 String orderByClause)
                                                                          throws javax.jcr.RepositoryException
Deprecated. 
Find content objects with one of the given templates below a given search root.

Parameters:
searchRoot -
templateNames -
maxResultSize - setting this can drastically improve query performance, if you are interested only in a fixed number of leading result objects
andClause - an additional "AND" clause in SQL syntax, excluding the "AND" itself, e.g. "date IS NOT NULL"
orderByClause - an "ORDER BY" clause in SQL syntax, excluding the "ORDER BY" itself, e.g. "date desc" or "date asc"
Throws:
javax.jcr.RepositoryException

cutList

public static List<info.magnolia.cms.core.Content> cutList(List<info.magnolia.cms.core.Content> itemsList,
                                                           int maxResults)
Deprecated. 

getContentListByTemplateCategorySubCategory

public static List<info.magnolia.cms.core.Content> getContentListByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot,
                                                                                               String category,
                                                                                               String subCategory)
                                                                                        throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

getContentListByTemplateCategorySubCategory

public static List<info.magnolia.cms.core.Content> getContentListByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot,
                                                                                               String category,
                                                                                               String subCategory,
                                                                                               int maxResultSize,
                                                                                               String andClause,
                                                                                               String orderBy)
                                                                                        throws javax.jcr.RepositoryException
Deprecated. 
FIXME commented out code: switch of RD from Template to ConfiguredTemplateDefinition makes this code unrunable. Has to be solved later.

Throws:
javax.jcr.RepositoryException

getNearestContentByTemplateCategorySubCategory

public static info.magnolia.cms.core.Content getNearestContentByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot,
                                                                                            String category,
                                                                                            String subCategory,
                                                                                            info.magnolia.cms.core.Content current)
                                                                                     throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

getContentByTemplateCategorySubCategory

public static info.magnolia.cms.core.Content getContentByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot,
                                                                                     String category,
                                                                                     String subCategory)
                                                                              throws javax.jcr.RepositoryException
Deprecated. 
Throws:
javax.jcr.RepositoryException

getTemplatesCategories

public static Collection<String> getTemplatesCategories()
Deprecated. 
FIXME commented out code: switch of RD from Template to ConfiguredTemplateDefinition makes this code unrunable. Has to be solved later.


count

public static int count(String name)
Deprecated. 
Increases the context bound counter and returns the value. This is for instance useful to create unique page wide ids.


encode

public static info.magnolia.cms.core.Content encode(info.magnolia.cms.core.Content content)
Deprecated. Since Magnolia 4.4/STK 1.4 use info.magnolia.module.templating.MagnoliaTemplatingUtilities.encode


wrap

public static info.magnolia.cms.core.Content wrap(info.magnolia.cms.core.Content content)
Deprecated. 

decode

public static info.magnolia.cms.core.Content decode(info.magnolia.cms.core.Content content)
Deprecated. Since Magnolia 4.4/STK 1.4 use info.magnolia.module.templating.MagnoliaTemplatingUtilities.decode


getSite

public static Site getSite()
Deprecated. 

getSite

public static Site getSite(info.magnolia.cms.core.Content content)
Deprecated. 
BEWARE! this method will resolve site based on content hierarchy rather then based on the current domain hence it should be used when the site need to be resolved explicitly in relation to the content with disrespect to what configuration is available in current context.


getDivIdAbbreviation

public static String getDivIdAbbreviation(String divID)
Deprecated. 

getDivIdAbbreviation

public static String getDivIdAbbreviation(String divID,
                                          String delimiter)
Deprecated. 

doPrivileged

public static void doPrivileged(info.magnolia.cms.core.Content content,
                                STKUtil.PrivilegedOperation privilegedOperation)
                         throws javax.jcr.RepositoryException
Deprecated. 
Retrieves the content from the system context, calls STKUtil.PrivilegedOperation.exec(Content), and refreshes the passed content.

Throws:
javax.jcr.RepositoryException

getOrCreatePrivileged

public static info.magnolia.cms.core.Content getOrCreatePrivileged(info.magnolia.cms.core.Content parent,
                                                                   String name,
                                                                   info.magnolia.cms.core.ItemType type)
                                                            throws javax.jcr.RepositoryException
Deprecated. 
If the content doesn't exist doPrivileged(Content, PrivilegedOperation) is used to create the node. The returned node is retrieved from the parent so that it has the same contex.

Throws:
javax.jcr.RepositoryException


Copyright © 2008-2012 Magnolia International Ltd.. All Rights Reserved.