Examples of SocialDataException


Examples of org.wso2.carbon.registry.social.api.SocialDataException

                    result = true;
                }

            } catch (RegistryException e) {
                log.error(e.getMessage(), e);
                throw new SocialDataException("Error while ignoring relationship request from "
                                              + owner + " to " + viewer, e);
            }
        }
        return result;
    }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

            registry.removeAssociation(ownerResourcePath, viewerResourcePath,
                                       SocialImplConstants.ASS_TYPE_RELATIONSHIP);

        } catch (RegistryException e) {
            log.error(e.getMessage(), e);
            throw new SocialDataException(
                    "Error while removing relationship between " + owner + " and " + viewer, e);
        }
        return true;
    }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

            saveActivity(userId, userActivity, false);

        } catch (RegistryException e) {
            log.error(e.getMessage(), e);
            throw new SocialDataException("Error while saving activity for person " + userId +
                    " with activityId " + userActivity.getId(), e);
        }

    }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

        try {
            registry = getRegistry();
            if (registry.resourceExists(activityResourcePath)) {
                registry.delete(activityResourcePath);
            } else {
                throw new SocialDataException
                        ("Activity with specified activityId " + activityId + " doesn't exist");
            }
        } catch (RegistryException e) {
            log.error(e.getMessage(), e);
            throw new SocialDataException("Error while deleting activity for person " + userId +
                    " for activityId " + activityId, e);
        }

    }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

        try {
            saveActivity(userId, userActivity, true);

        } catch (RegistryException e) {
            log.error(e.getMessage(), e);
            throw new SocialDataException(e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

                        }
                    }
                }
            } catch (RegistryException e) {
                log.error(e.getMessage(), e);
                throw new SocialDataException(
                        "Error while retrieving activities for user " + userId, e);
            }

        }
        Activity[] activities = new ActivityImpl[activityList.size()];
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

     */
    public Activity[] getActivities(String userId, String groupId, String appId, Set<String> fields,
                                    FilterOptions options, String[] activityIds)
            throws SocialDataException {
        if (activityIds == null) {
            throw new SocialDataException("Invalid activity ids");
        }
        if (activityIds.length <= 0) {
            getActivities(new String[]{userId}, groupId, appId, fields, options);
        }
         //TODO: GroupID
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

                                String activityId) throws SocialDataException {
        //TODO: Set<String> fields is not currently used -- all fields are retrieved
        Activity userActivity = null;
        if ((userId == null || userId.trim().equals("") || appId == null ||
                appId.trim().equals("") || activityId == null || activityId.trim().equals(""))) {
            throw new SocialDataException("Invalid parameters provided. " +
                    "One or more of the parameter is either null or empty");
        }
        try {
            registry = getRegistry();
            if (groupId == null || groupId.equals(SocialImplConstants.GROUP_ID_SELF)) {
                // retrieve activity for user {userId}
                userActivity = getUserActivity(userId, appId, activityId);

            }
            //TODO: Handle GroupID= @friends, @topfriends etc
        }
        catch (RegistryException e) {
            log.error(e.getMessage(), e);
            throw new SocialDataException("Error while retrieving activity of user " +
                    userId + " with activityId " + activityId, e);
        }

        return userActivity;
    }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

            throws SocialDataException {
        // Should save the activity according to given parameters
        if (activity == null) {
            String errorMsg = "Cannot create activity. Passed Activity argument is null";
            log.error(errorMsg);
            throw new SocialDataException(errorMsg);
        }
        //if the posted time is not set, set system time as posted time
        if (activity.getPostedTime() == null || activity.getPostedTime() == 0) {
            activity.setPostedTime(System.currentTimeMillis());
        }
View Full Code Here

Examples of org.wso2.carbon.registry.social.api.SocialDataException

                userStoreManager.addUser(userId, "abcd123", new String[]{"admin"}, null, null);
            }
            userStoreManager.setUserClaimValues(userId, retrieveClaimValues(person), null);
        } catch (UserStoreException e) {
            log.error(e.getMessage(), e);
            throw new SocialDataException("Error while saving person with id " + userId, e);
        }
        catch (RegistryException e) {
            log.error(e.getMessage(), e);
            throw new SocialDataException("Error while saving person with id " + userId, e);
        }
        return true;
    }
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.