Examples of ActivityManager


Examples of org.apache.webbeans.container.activity.ActivityManager

     *
     * @return the current activity
     */
    public static BeanManagerImpl getManager()
    {
        ActivityManager activityManager = ActivityManager.getInstance();
       
        BeanManagerImpl currentManager = activityManager.getCurrentActivity();
       
        return currentManager;
    }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.activity.ActivityManager

            // commit registry transaction
            registry.commitTransaction();
            if (getConfigUserRegistry() instanceof UserRegistry) {
                String userId = ((UserRegistry) getConfigUserRegistry()).getUserName();
                // Recording Activities
                ActivityManager manager = new ActivityManagerImpl();
                Activity activity = new ActivityImpl();
                activity.setTitle("added " + gName + "gadget to the gadget repository");
                activity.setUrl(gUrl);
                activity.setBody(gScreen);
                manager.createActivity(userId, "self", "gs", null, activity);
            }

            return true;

        } catch (Exception e) {
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.activity.ActivityManager

        try {
            DashboardService dashboardService = new DashboardService();
            response = dashboardService.addGadgetToUser(userId, tabId, url, dashboardName, gadgetGroup);
            if (response) {
                // Record Activities
                ActivityManager manager = new ActivityManagerImpl();
                Activity activity = new ActivityImpl();
                activity.setTitle("added new Gadget to the Dashboard ");
                String gadgetViewUrl = "../gadgetrepo/gadget-page.jsp?gadgetPath=" + gadgetPath + "&tab=" + tabId + "&grp=" + gadgetGroup.substring(0, gadgetGroup.indexOf("#"));
                activity.setUrl(gadgetViewUrl);
                manager.createActivity(userId, "self", "gs", null, activity);
            }
        } catch (Exception e) {
            log.error(e);
            if (registry != null) {
                try {
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.activity.ActivityManager

            gadgetComment.setCreatedTime(new Date());

            registry.addComment(gadgetPath, gadgetComment);
            // Recording Activities
            ActivityManager manager = new ActivityManagerImpl();
            Activity activity = new ActivityImpl();
            activity.setTitle("commented on Gadget");
            activity.setUrl("../" + comment.getCommentPath());
            activity.setBody(comment.getCommentText());
            manager.createActivity(comment.getAuthorUserName(), "self", "gs", null, activity);
            return true;
        } catch (Exception e) {
            log.error("Backend server error : Could not make the comment", e);
            return false;
        }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.activity.ActivityManager

            registry.rateResource(gadgetPath, rating);

            if (registry instanceof UserRegistry) {
                String userId = ((UserRegistry) registry).getUserName();
                // Recording Activities
                ActivityManager manager = new ActivityManagerImpl();
                Activity activity = new ActivityImpl();
                activity.setTitle("rated gadget with rating: " + rating);
                String gadgetViewUrl = "../gadgetrepo/gadget-page.jsp?gadgetPath=" + gadgetPath + "&tab=" + tabId + "&grp=" + gadgetGroup;
                activity.setUrl(gadgetViewUrl);
                activity.setBody(rating + "");
                manager.createActivity(userId, "self", "gs", null, activity);
            }

            return true;
        } catch (Exception e) {
            log.error("Backend server error : Could not rate the resource", e);
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.activity.ActivityManager

            // commit registry transaction
            registry.commitTransaction();
            if (getConfigUserRegistry() instanceof UserRegistry) {
                String userId = ((UserRegistry) getConfigUserRegistry()).getUserName();
                // Recording Activities
                ActivityManager manager = new ActivityManagerImpl();
                Activity activity = new ActivityImpl();
                activity.setTitle("added " + gName + "gadget to the gadget repository");
                activity.setUrl(gUrl);
                //activity.setBody(gScreen);
                manager.createActivity(userId, "self", "gs", null, activity);
            }

            return true;

        } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.