Package xregistry

Examples of xregistry.XregistryException


                break;
            case CWsdl:
                buf.append(":cwsdl");
                break;
            default:
                throw new XregistryException("Unknown resource type, type =" + type);
        }
       
        for(String name:names){
            buf.append(":");
            buf.append(name);   
View Full Code Here


            HostDescriptionType hostDesc = HostDescriptionDocument.Factory.parse(
                    new StringReader(hostDescAsStr)).getHostDescription();
            hostDesc.validate();
            return hostDesc.getHostName();
        } catch (XmlException e) {
            throw new XregistryException(e);
        } catch (IOException e) {
            throw new XregistryException(e);
        }
    }
View Full Code Here

            ServiceMapType serviceDesc = ServiceMapDocument.Factory.parse(
                    new StringReader(serviceDescAsStr)).getServiceMap();
            serviceDesc.validate();
            return serviceDesc;
        } catch (XmlException e) {
            throw new XregistryException(e);
        } catch (IOException e) {
            throw new XregistryException(e);
        }
    }
View Full Code Here

            ApplicationDescriptionType appDesc = ApplicationDescriptionDocument.Factory.parse(
                    new StringReader(appDescAsStr)).getApplicationDescription();
            appDesc.validate();
            return appDesc;
        } catch (XmlException e) {
            throw new XregistryException(e);
        } catch (IOException e) {
            throw new XregistryException(e);
        }
    }
View Full Code Here

                return (String) serviceTable.get(WSDLConstants.AWSDL);
            }else{
                return (String) serviceTable.get(WSDLConstants.WSDL);
            }
        } catch (XmlException e) {
            throw new XregistryException(e);
        } catch (Exception e) {
            throw new XregistryException(e);
        }
    }
View Full Code Here

                    }
                }
                System.out.print(REGISTRY_SHELL_PROMPT);
            }
        } catch (IOException e) {
            throw new XregistryException(e);
        }
    }
View Full Code Here

                case ResourceAdmin:
                    owner = getOwner(resourceID, connection);
                    if (Utils.isSameDN(owner, user) || groupManager.isAdminUser(user)) {
                        return true;
                    } else {
                        throw new XregistryException(action
                                + " is a Admin Operation, and only owner of " + resourceID
                                + " is allowed ");
                    }
                case SysAdmin:
                    if (groupManager.isAdminUser(user)) {
                        return true;
                    } else {
                        throw new XregistryException(action + " is a Admin operation but user " + user
                                + " is not an adminsitrator");
                    }
                case Write:
                    return verifyWriteAccesses(user, resourceID, action, connection);
                default:
                    throw new XregistryException("User " + user
                            + " is not authorized to a perform this action " + action);
            }
        } finally {
            context.closeConnection(connection);
        }
View Full Code Here

                        authorized = group.isAuthorized(user, traversal);
                        if (authorized) {
                            return true;
                        }
                    }
                    throw new XregistryException("User " + user
                            + " is not authorized to accsess resource " + resourceID);
                }

            } else {
                throw new XregistryException("For write access resource ID must not be Null");
            }
        } catch (SQLException e) {
            throw new XregistryException(e);
        }
    }
View Full Code Here

                statement.setString(1, resourceID);
                results = statement.executeQuery();
                if (results.next()) {
                    return results.getString(OWNER);
                } else {
                    throw new XregistryException("No such resource " + resourceID);
                }
            } catch (SQLException e) {
                throw new XregistryException(e);
            } catch (XregistryException e) {
                throw new XregistryException(e);
            } finally {
                if (results != null) {
                    results.close();
                }
            }
        } catch (SQLException e) {
            throw new XregistryException(e);
        }
    }
View Full Code Here

            getCapability.setActorType(actorType);
            getCapability.setAction(action);
            GetCapabilityResponseDocument capabilityResponse = proxy.getCapability(document);
            return capabilityResponse.getGetCapabilityResponse().getTokenArray();
        }else{
            throw new XregistryException("one of the resourceID or actor must present");
        }
    }
View Full Code Here

TOP

Related Classes of xregistry.XregistryException

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.