Package org.wso2.carbon.messagebox

Examples of org.wso2.carbon.messagebox.MessageBoxException


            throw getNoneExistenceQueueException();
        } else {
            if (isAdminLoggedIn() || messageBoxId.split(File.separator)[0].equals(getLoggedInUser())) {
                messageBox.removePermission(permissionLabelName);
            } else {
                throw new MessageBoxException(getLoggedInUser() +
                                              " has no permission to remove permission on shared message box  " +
                                              messageBoxId);
            }
        }
    }
View Full Code Here


            throw getNoneExistenceQueueException();
        } else {
            if (isAdminLoggedIn() || messageBoxId.split(File.separator)[0].equals(getLoggedInUser())) {
                messageBox.addPermission(permissionLabelName, sharedUsersList, operationsList);
            } else {
                throw new MessageBoxException(getLoggedInUser() +
                                              " has no permission to remove permission on shared message box  " +
                                              messageBoxId);
            }
        }
    }
View Full Code Here

        Object userName = MessageContext.getCurrentMessageContext().getProperty("username");
        if (userName != null) {
            loggedInUser = userName.toString();
            return loggedInUser;
        } else {
            throw new MessageBoxException("Failed to get logged in user");
        }

    }
View Full Code Here

    /**
     * @return NoneExistenceQueueException
     */
    private MessageBoxException getNoneExistenceQueueException() {
        return new MessageBoxException("Queue does not exist.",
                                       "AWS.SimpleQueueService.NonExistentQueue");
    }
View Full Code Here

    /**
     * @return AccessDeniedException
     */
    private MessageBoxException getAccessDeniedException() {
        return new MessageBoxException("Access to the resource is denied.", "AccessDenied ");
    }
View Full Code Here

            if (!userRegistry.resourceExists(MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH)) {
                userRegistry.put(MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH,
                                 userRegistry.newCollection());
            }
        } catch (RegistryException e) {
            throw new MessageBoxException("Can not access the user registry ", e);
        }
    }
View Full Code Here

            collection.setProperty(MessageBoxConstants.SQS_QUEUE_ATTRIBUTE_CREATED_TIMESTAMP,
                                   Long.toString(System.currentTimeMillis()));
            userRegistry.put(getMessageBoxResourcePath(owner, name), collection);
        } catch (RegistryException e) {
            throw new MessageBoxException("Can not create a new registry collection ", e);
        }
    }
View Full Code Here

     */
    public boolean isMessageBoxExists(String owner, String name) throws MessageBoxException {
        try {
            return Utils.getUserRegistry().resourceExists(getMessageBoxResourcePath(owner, name));
        } catch (RegistryException e) {
            throw new MessageBoxException("Can not find the resource ", e);
        }
    }
View Full Code Here

                                                queueNamePrefix);
                }
            }
            return messageBoxURISuffixes;
        } catch (RegistryException e) {
            throw new MessageBoxException("Can not access the registry ", e);
        }
    }
View Full Code Here

                    messageBoxDetailsList.add(messageBoxDetails);
                }
            }
            return messageBoxDetailsList;
        } catch (RegistryException e) {
            throw new MessageBoxException("Can not access the user registry ", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.messagebox.MessageBoxException

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.