Package org.openxri.store

Examples of org.openxri.store.StoreDuplicateEntryException


    String authorityId = this.getUUID();
    File authorityDir = this.getAuthorityDir(authorityId);

    if (authorityDir.exists()) {

      throw new StoreDuplicateEntryException("Authority exists already.");
    }

    FileAuthority authority = new FileAuthority(authorityDir);

    try {
View Full Code Here


    String authorityId = this.getUUID();
    File authorityDir = this.getAuthorityDir(authorityId);

    if (authorityDir.exists()) {

      throw new StoreDuplicateEntryException("Root authority exists already.");
    }

    FileAuthority authority = new FileAuthority(authorityDir);

    try {

      authority.internalSetAuthorityId(authorityId);
      authority.internalSetNamespace(namespace);
      authority.internalSetLocalAuthService(Boolean.TRUE);
    } catch (IOException ex) {

      throw new StoreInternalException(ex, "Cannot create root authority.");
    }

    // create namespace

    File namespaceFile = this.getNamespaceFile(namespace);

    if (namespaceFile.exists()) {

      throw new StoreDuplicateEntryException("Namespace exists already.");
    }

    try {

      FileStore.writeLine(namespaceFile, authorityId);
View Full Code Here

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

    if (subSegmentDir.exists()) {

      throw new StoreDuplicateEntryException("Subsegment exists already.");
    }

    FileSubSegment subSegment = new FileSubSegment(subSegmentDir);

    try {
View Full Code Here

    String authorityId = this.getUUID();
    File authorityDir = this.getAuthorityDir(authorityId);

    if (authorityDir.exists()) {

      throw new StoreDuplicateEntryException("Authority exists already.");
    }

    FileAuthority authority = new FileAuthority(authorityDir);

    try {

      authority.internalSetAuthorityId(authorityId);
      authority.internalSetNamespace(null);
      authority.internalSetLocalAuthService(localAuthService);
      authority.internalSetRefs(refs);
      authority.internalSetServices(services);
    } catch (IOException ex) {

      throw new StoreInternalException(ex, "Cannot create rootauthority.");
    }

    // create subsegment

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

    if (subSegmentDir.exists()) {

      throw new StoreDuplicateEntryException("Subsegment exists already.");
    }

    FileSubSegment subSegment = new FileSubSegment(subSegmentDir);

    try {
View Full Code Here

TOP

Related Classes of org.openxri.store.StoreDuplicateEntryException

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.