public class RatingNamingConventionsUtil extends Object
"cm:" + <ratingSchemeName> + "Rollups" e.g. cm:likesRatingSchemeRollupsThen within that aspect, any rolled up property values will be persisted in a property named:
"cm:" + <ratingSchemeName> + <rollupName> e.g. cm:likesRatingSchemeCountThe ratingSchemeName is the spring bean name of the rating scheme and the rollupName is the rollup name as defined in the algorithm class e.g.
RatingCountRollupAlgorithm.ROLLUP_NAME
.
Since Alfresco 4.1.5, the "cm:" prefix is no longer required and any namespace can be used. These are provided
via injection with RatingSchemeImpl.setModelPrefix(String)
Constructor and Description |
---|
RatingNamingConventionsUtil() |
Modifier and Type | Method and Description |
---|---|
org.alfresco.service.namespace.QName |
getRatingAssocNameFor(String username,
String ratingSchemeName)
This method returns the
association name that will be used to link
a cm:rateable node to its cm:rating child for the specified username and ratingSchemeName. |
org.alfresco.service.namespace.QNamePattern |
getRatingAssocPatternForUser(String username,
String ratingSchemeName)
This method returns a QNamePattern for the specified username and ratingSchemeName.
|
org.alfresco.service.namespace.QName |
getRollupAspectNameFor(RatingScheme ratingScheme)
Given a ratingScheme, this method returns the aspect name which would
by convention be used to store rating property rollups.
|
org.alfresco.service.namespace.QName |
getRollupAspectNameFor(String ratingSchemeName)
Deprecated.
Use
getRollupAspectNameFor(RatingScheme) instead. This method assumes a "cm" prefix for the aspect. |
org.alfresco.service.namespace.QName |
getRollupPropertyNameFor(RatingScheme ratingScheme,
String rollupName)
Given a ratingScheme and a rollup name, this method returns the property name
which would by convention be used to store the given rollup.
|
org.alfresco.service.namespace.QName |
getRollupPropertyNameFor(String ratingSchemeName,
String rollupName)
Deprecated.
Use
getRollupPropertyNameFor(RatingScheme, String) instead.
This method assumes a "cm" prefix for the aspect. |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public org.alfresco.service.namespace.QName getRatingAssocNameFor(String username, String ratingSchemeName)
association name
that will be used to link
a cm:rateable node to its cm:rating child for the specified username and ratingSchemeName.public org.alfresco.service.namespace.QNamePattern getRatingAssocPatternForUser(String username, String ratingSchemeName)
username
- the username to match against or null
for all usernames.ratingSchemeName
- the ratingSchemeName to match against or null
for all ratingSchemes.public org.alfresco.service.namespace.QName getRollupAspectNameFor(String ratingSchemeName)
getRollupAspectNameFor(RatingScheme)
instead. This method assumes a "cm" prefix for the aspect.ratingSchemeName
- the ratingSchemeName, which is the spring bean name.public org.alfresco.service.namespace.QName getRollupAspectNameFor(RatingScheme ratingScheme)
ratingScheme
- the ratingScheme.public org.alfresco.service.namespace.QName getRollupPropertyNameFor(String ratingSchemeName, String rollupName)
getRollupPropertyNameFor(RatingScheme, String)
instead.
This method assumes a "cm" prefix for the aspect.ratingSchemeName
- the ratingSchemeName, which is the spring bean name.rollupName
- the name of the property rollup as given by AbstractRatingRollupAlgorithm.getRollupName()
.public org.alfresco.service.namespace.QName getRollupPropertyNameFor(RatingScheme ratingScheme, String rollupName)
ratingScheme
- the ratingScheme.rollupName
- the name of the property rollup as given by AbstractRatingRollupAlgorithm.getRollupName()
.Copyright © 2005–2017 Alfresco Software. All rights reserved.