|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.rating.RatingNamingConventionsUtil
public class RatingNamingConventionsUtil
This class encapsulates the naming conventions used in the RatingService. e.g. the naming conventions used for the aspect and for the properties in the content model.
Each rating scheme which has one or more rating property rollups, will lead to the addition of an aspect on to the rated node. This aspect is named:"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
.
Constructor Summary | |
---|---|
RatingNamingConventionsUtil()
|
Method Summary | |
---|---|
org.alfresco.service.namespace.QName |
getRatingAssocNameFor(java.lang.String username,
java.lang.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(java.lang.String username,
java.lang.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(java.lang.String ratingSchemeName)
Given a ratingSchemeName, this method returns the aspect name which would by convention be used to store rating property rollups. |
org.alfresco.service.namespace.QName |
getRollupPropertyNameFor(RatingScheme ratingScheme,
java.lang.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(java.lang.String ratingSchemeName,
java.lang.String rollupName)
Given a ratingSchemeName and a rollup name, this method returns the property name which would by convention be used to store the given rollup. |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RatingNamingConventionsUtil()
Method Detail |
---|
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public org.alfresco.service.namespace.QName getRatingAssocNameFor(java.lang.String username, java.lang.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(java.lang.String username, java.lang.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(java.lang.String ratingSchemeName)
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(java.lang.String ratingSchemeName, java.lang.String rollupName)
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, java.lang.String rollupName)
ratingScheme
- the ratingScheme.rollupName
- the name of the property rollup as given by AbstractRatingRollupAlgorithm.getRollupName()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |