Package org.openxri.store

Examples of org.openxri.store.StoreNotFoundException


        SubSegment subSegment;
       
        try {

          subSegment = moStore.findSubSegment(parent, subSegmentName);
          if (subSegment == null) throw new StoreNotFoundException("Null value returned.");
        } catch (StoreNotFoundException ex) {

          ServerNotFoundException ex2 = new ServerNotFoundException("Cannot find subsegment: " + subSegmentName, ex);
          soLog.warn(ex2);
          throw ex2;
View Full Code Here


    String authorityId = ((FileAuthority)authority).getAuthorityId();
    File authorityDir = this.getAuthorityDir(authorityId);

    if (! authorityDir.exists()) {

      throw new StoreNotFoundException("Authority does not exist.");
    }

    try {

      FileStore.deleteDir(authorityDir);
View Full Code Here

    File namespaceFile = this.getNamespaceFile(namespace);
    String authorityId;

    if (! namespaceFile.exists()) {

      throw new StoreNotFoundException("Namespace does not exist.");
    }

    try {

      authorityId = FileStore.readLine(namespaceFile);
    } catch (Exception ex) {

      throw new StoreInternalException(ex, "Cannot find namespace.");
    }

    // delete authority

    File authorityDir = this.getAuthorityDir(authorityId);

    if (! authorityDir.exists()) {

      throw new StoreNotFoundException("Authority does not exist.");
    }

    try {

      FileStore.deleteDir(authorityDir);
View Full Code Here

    String parentAuthorityId = parent.getAuthorityId();
    File parentAuthorityDir = this.getAuthorityDir(parentAuthorityId);

    if (! parentAuthorityDir.exists()) {

      throw new StoreNotFoundException("Parent authority does not exist.");
    }

    // create alias subsegment

    File subSegmentDir = this.getSubSegmentDir(parentAuthorityDir, subSegmentName);
View Full Code Here

    String parentAuthorityId = parent.getAuthorityId();
    File parentAuthorityDir = this.getAuthorityDir(parentAuthorityId);

    if (! parentAuthorityDir.exists()) {

      throw new StoreNotFoundException("Parent authority does not exist.");
    }

    // create new authority

    String authorityId = this.getUUID();
View Full Code Here

    String authorityId = ((FileSubSegment)subSegment).getAuthorityId();
    File authorityDir = this.getAuthorityDir(authorityId);

    if (! authorityDir.exists()) {

      throw new StoreNotFoundException("Authority does not exist.");
    }

    // get subsegment dir

    String subSegmentName = subSegment.getName();
    File subSegmentDir = this.getSubSegmentDir(authorityDir, subSegmentName);

    if (! subSegmentDir.exists()) {

      throw new StoreNotFoundException("Subsegment does not exist.");
    }

    // delete it

    try {
View Full Code Here

    File authorityDir = this.getAuthorityDir(authorityId);

    if (! authorityDir.exists()) {

      throw new StoreNotFoundException("Authority does not exist.");
    }

    FileAuthority authority = new FileAuthority(authorityDir);

    // done
View Full Code Here

    File namespaceFile = this.getNamespaceFile(namespace);
    String authorityId;

    if (! namespaceFile.exists()) {

      throw new StoreNotFoundException("Namespace does not exist.");
    }

    try {

      authorityId = FileStore.readLine(namespaceFile);
    } catch (Exception ex) {

      throw new StoreInternalException(ex, "Cannot find namespace.");
    }

    File authorityDir = this.getAuthorityDir(authorityId);

    if (! authorityDir.exists()) {

      throw new StoreNotFoundException("Authority does not exist.");
    }

    FileAuthority authority = new FileAuthority(authorityDir);

    // done
View Full Code Here

    File authorityDir = this.getAuthorityDir(authority.getAuthorityId());

    if (! authorityDir.exists()) {

      throw new StoreNotFoundException("Authority does not exist.");
    }

    File subSegmentDir = this.getSubSegmentDir(authorityDir, subSegmentName);

    if (! subSegmentDir.exists()) {

      throw new StoreNotFoundException("Subsegment does not exist.");
    }

    SubSegment subSegment = new FileSubSegment(subSegmentDir);

    // done
View Full Code Here

    File authorityDir = this.getAuthorityDir(((FileSubSegment)subSegment).getAuthorityId());

    if (! authorityDir.exists()) {

      throw new StoreNotFoundException("Authority does not exist.");
    }

    FileAuthority authority = new FileAuthority(authorityDir);

    // done
View Full Code Here

TOP

Related Classes of org.openxri.store.StoreNotFoundException

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.