Package org.wso2.carbon.messagebox.admin.internal.exception

Examples of org.wso2.carbon.messagebox.admin.internal.exception.MessageBoxAdminException


   
    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

                }
                index++;
            }
            return messageBoxDetailArray;
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Failed to list all messageboxes.", e);
        }
    }
View Full Code Here

    public int getMessageBoxesCount() throws MessageBoxAdminException {
        MessageBoxHolder messageBoxService = MessageBoxHolder.getInstance();
        try {
            return messageBoxService.getMessageboxService().getAllMessageBoxes().length;
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Failed to get total number of message boxes.", e);
        }
    }
View Full Code Here

            throws MessageBoxAdminException {
        MessageBoxHolder messageBoxService = MessageBoxHolder.getInstance();
        try {
            return messageBoxService.getMessageboxService().getAllAvailableMessages(messageBoxId);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Failed to receive messages from messagebox: " +
                                               messageBoxId, e);
        }

    }
View Full Code Here

            throws MessageBoxAdminException {
        MessageBoxHolder messageBoxService = MessageBoxHolder.getInstance();
        try {
            return messageBoxService.getMessageboxService().getAllRetrievedMessages(messageBoxId);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Failed to receive messages from messagebox: " +
                                               messageBoxId, e);
        }

    }
View Full Code Here

        try {
            List<PermissionLabel> permissionLabels =
                    messageBoxService.getMessageboxService().getAllPermissions(messageBoxId);
            return permissionLabels.toArray(new PermissionLabel[permissionLabels.size()]);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Failed to receive messages from messagebox: " +
                                               messageBoxId, e);
        }
    }
View Full Code Here

            try {
                if (!(loggedInUser.equals(userName) || Utils.isAdmin(loggedInUser))) {
                    secretAccessKeyId = null;
                }
            } catch (MessageBoxException e) {
                throw new MessageBoxAdminException(
                        "Failed to check if the logged in user has admin privileges.");
            }

            return new SQSKeys(accessKeyId, secretAccessKeyId);
        } catch (RegistryException e) {
            throw new MessageBoxAdminException("Failed to get access keys of user " + userName, e);
        }

    }
View Full Code Here

                }
                index++;
            }
            return allQueues.toArray(new Queue[allQueues.size()]);
        } catch (MessageBoxException e) {
            throw new MessageBoxAdminException("Can not get the queue manager ", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.messagebox.admin.internal.exception.MessageBoxAdminException

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.