|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.templatingkit.util.STKUtil
STKTemplatingFunctions
instead.
public class STKUtil
Set of static util that are about to be replaced.
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 |
---|
public static final STKUtil INSTANCE
public static final String JAVASCRIPT_RESOURCES_PATH
public static final String JAVASCRIPT_RESOURCES_ALL_PATH
Constructor Detail |
---|
public STKUtil()
Method Detail |
---|
protected static STKTemplatingFunctions getFunctions()
public static Asset getAssetVariation(Asset original, String variationName)
STKTemplatingFunctions
instead.
public static Asset getAsset(info.magnolia.cms.core.Content content, String nodeDataPrefix)
public static Asset getAsset(info.magnolia.cms.core.Content content, String nodeDataPrefix, String variationName)
public static String getAssetLink(info.magnolia.cms.core.Content content, String nodeDataPrefix)
public static String getAssetLink(info.magnolia.cms.core.Content content, String nodeDataPrefix, info.magnolia.module.templating.RenderingModelImpl model)
public static String getAssetLink(info.magnolia.cms.core.Content content, String nodeDataPrefix, String variationName)
public static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData)
public static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData, info.magnolia.module.templating.RenderingModelImpl model)
public static String resolveImageVariationName(info.magnolia.module.templating.RenderingModelImpl model)
public static String createImageLink(info.magnolia.cms.core.NodeData binaryNodeData, String variationName)
public static InheritedContentModel inheritContent(info.magnolia.cms.core.Content content, String name) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static Collection<info.magnolia.cms.core.Content> collectContentByUsingInheritance(info.magnolia.cms.core.Content content, String name) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static boolean isChildOf(info.magnolia.cms.core.Content parent, info.magnolia.cms.core.Content child)
public static String getExternalLink(info.magnolia.cms.core.Content content, String linkNodeName)
http://
in case the protocol is missing or an empty String
if the link does not exist.public static String getExternalLinkTitle(info.magnolia.cms.core.Content content, String linkNodeName, String linkTitleNodeName)
public static String abbreviateString(String stringToCut, int size)
public static String abbreviateString(String stringToCut, int size, String closureString)
public static String asStringList(List<ParagraphConfig> paragraphs)
public static List<String> getAllowedParagraphs(Area area)
getAllowedComponents(AreaDefinition)
public static List<String> getAllowedComponents(info.magnolia.rendering.template.AreaDefinition area)
public static boolean currentUserHasOneRole(Collection<String> requiredRoles)
public static info.magnolia.cms.core.Content getReferencedContent(info.magnolia.cms.core.Content contentNode, String nodeDataName, String referencedRepository)
contentNode
- the node with a nodedata containing a uuidnodeDataName
- the name of the nodedata which contains the uuid as a stringreferencedRepository
- the repository in which the referenced node exists
public static List<info.magnolia.cms.core.Content> getContentListByTemplateName(info.magnolia.cms.core.Content searchRoot, String templateName) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
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
javax.jcr.RepositoryException
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
searchRoot
- templateNames
- maxResultSize
- setting this can drastically improve query performance, if you are interested only in a fixed number
of leading result objectsandClause
- 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"
javax.jcr.RepositoryException
public static List<info.magnolia.cms.core.Content> cutList(List<info.magnolia.cms.core.Content> itemsList, int maxResults)
public static List<info.magnolia.cms.core.Content> getContentListByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot, String category, String subCategory) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
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
Template
to ConfiguredTemplateDefinition
makes this
code unrunable. Has to be solved later.
javax.jcr.RepositoryException
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
javax.jcr.RepositoryException
public static info.magnolia.cms.core.Content getContentByTemplateCategorySubCategory(info.magnolia.cms.core.Content siteRoot, String category, String subCategory) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public static Collection<String> getTemplatesCategories()
Template
to ConfiguredTemplateDefinition
makes this
code unrunable. Has to be solved later.
public static int count(String name)
public static info.magnolia.cms.core.Content encode(info.magnolia.cms.core.Content content)
public static info.magnolia.cms.core.Content wrap(info.magnolia.cms.core.Content content)
public static info.magnolia.cms.core.Content decode(info.magnolia.cms.core.Content content)
public static Site getSite()
public static Site getSite(info.magnolia.cms.core.Content content)
public static String getDivIdAbbreviation(String divID)
public static String getDivIdAbbreviation(String divID, String delimiter)
public static void doPrivileged(info.magnolia.cms.core.Content content, STKUtil.PrivilegedOperation privilegedOperation) throws javax.jcr.RepositoryException
STKUtil.PrivilegedOperation.exec(Content)
, and refreshes the
passed content.
javax.jcr.RepositoryException
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
doPrivileged(Content, PrivilegedOperation)
is used to create the node. The
returned node is retrieved from the parent so that it has the same contex.
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |