Package org.wso2.carbon.registry.social.api

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


   
    protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
      byte[] b=new byte[is.available()];
      is.read(b);
   
      BPELInterface bpel = new BPELImpl();
        OMElement bpelStr = bpel.load(new String(b));
       
        bpel.processBpelString(bpelStr);

        LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here


   * @param transformer The optional image transformer
   * @throws java.io.IOException Failed to generate the representation
   */
    public static void generate(java.io.InputStream is, java.io.OutputStream os,
                SVGImageTransformer transformer) throws java.io.IOException {
        SVGImpl svg = generateSVGImpl(is);
       
        if (transformer == null) {
          String str=svg.getHeaders()+svg.generateSVGString();
          os.write(str.getBytes());
        } else {
          transformer.transform(svg, os);
        }
    }
View Full Code Here

        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here

                    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

            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

            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

        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

        try {
            saveActivity(userId, userActivity, true);

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

                        }
                    }
                }
            } 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

     */
    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

TOP

Related Classes of org.wso2.carbon.registry.social.api.SocialDataException

Copyright © 2018 www.massapicom. 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.