// Path: behaviors/behavior-tutorial/behavior-tutorial-platform/src/main/java/com/someco/model/SomeCoRatingsModel.java
// public interface SomeCoRatingsModel {
//     // Namespaces
//     public static final String NAMESPACE_SOMECO_RATINGS_CONTENT_MODEL  = "http://www.someco.com/model/ratings/1.0";
// 
//     // Types
//     public static final String TYPE_SCR_RATING = "rating";
// 
//     // Aspects
//     public static final String ASPECT_SCR_RATEABLE = "rateable";
// 
//     // Properties
//     public static final String PROP_RATING = "rating";
//     public static final String PROP_RATER = "rater";
//     public static final String PROP_AVERAGE_RATING= "averageRating";
//     public static final String PROP_TOTAL_RATING= "totalRating";
//     public static final String PROP_RATING_COUNT= "ratingCount";
// 
//     // Associations
//     public static final String ASSN_SCR_RATINGS = "ratings";
// }


import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
import org.apache.log4j.Logger;
import com.someco.model.SomeCoRatingsModel;
package com.someco.beans;




public class RatingBean {

    // Dependencies
    private NodeService nodeService;

    private Logger logger = Logger.getLogger(RatingBean.class);

    public void create(final NodeRef nodeRef, final int rating, final String user) {
        logger.debug("Inside RatingBean.create()");

        // add the aspect to this document if it needs it
        if (nodeService.hasAspect(nodeRef, QName.createQName(
// Path: behaviors/behavior-tutorial/behavior-tutorial-platform/src/main/java/com/someco/model/SomeCoRatingsModel.java
// public interface SomeCoRatingsModel {
//     // Namespaces
//     public static final String NAMESPACE_SOMECO_RATINGS_CONTENT_MODEL  = "http://www.someco.com/model/ratings/1.0";
// 
//     // Types
//     public static final String TYPE_SCR_RATING = "rating";
// 
//     // Aspects
//     public static final String ASPECT_SCR_RATEABLE = "rateable";
// 
//     // Properties
//     public static final String PROP_RATING = "rating";
//     public static final String PROP_RATER = "rater";
//     public static final String PROP_AVERAGE_RATING= "averageRating";
//     public static final String PROP_TOTAL_RATING= "totalRating";
//     public static final String PROP_RATING_COUNT= "ratingCount";
// 
//     // Associations
//     public static final String ASSN_SCR_RATINGS = "ratings";
// }


// Path: webscripts/webscripts-tutorial/webscripts-tutorial-platform/src/main/java/com/someco/beans/RatingBean.java
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
import org.apache.log4j.Logger;
import com.someco.model.SomeCoRatingsModel;

package com.someco.beans;




public class RatingBean {

    // Dependencies
    private NodeService nodeService;

    private Logger logger = Logger.getLogger(RatingBean.class);

    public void create(final NodeRef nodeRef, final int rating, final String user) {
        logger.debug("Inside RatingBean.create()");

        // add the aspect to this document if it needs it
        if (nodeService.hasAspect(nodeRef, QName.createQName(
                SomeCoRatingsModel.NAMESPACE_SOMECO_RATINGS_CONTENT_MODEL,