Package org.openxri.pipeline

Examples of org.openxri.pipeline.Pipeline


      private static final long serialVersionUID = 6099999471694144186L;

      @Override
      protected void populateItem(ListItem item) {
       
        Pipeline pipeline = (Pipeline) item.getModelObject();
       
        item.add(new PipelinePanel("pipeline", pipeline));
      }
    });
  }
View Full Code Here


      }

      // instantiate pipeline

      String name = pipelineConfig.getName();
      Pipeline pipeline = new Pipeline(name, stages);

      // register it

      this.pipelineList.add(pipeline);
      this.pipelineMap.put(name, pipeline);
View Full Code Here

        // check if the authority overrides the LOOKUP pipeline. if not, use the default.

        ServerConfig serverConfig = ServerConfigFactory.getSingleton();
        PipelineRegistry pipelineRegistry = (serverConfig == null) ? null : serverConfig.getPipelineRegistry();
        Pipeline lookupPipeline = null;

        if (this.store instanceof StoreAttributable) {

          StoreAttributable storeAttributable = (StoreAttributable) this.store;

          String pipelineName = storeAttributable.getAuthorityAttributes(namespaceAuthority).get(Pipeline.ATTRIBUTE_OVERRIDE_LOOKUP_PIPELINE);
          if (pipelineRegistry != null && pipelineName != null) lookupPipeline = pipelineRegistry.getPipelineByName(pipelineName);
        }

        if (pipelineRegistry != null && lookupPipeline == null) lookupPipeline = pipelineRegistry.getDefaultLookupPipeline();

        // execute LOOKUP pipeline

        xrd = lookupPipeline.execute(
            this.store,
            xrd,
            null,
            null,
            namespace,
View Full Code Here

        // check if the parent authority overrides the LOOKUP pipeline. if not, use the default.

        ServerConfig serverConfig = ServerConfigFactory.getSingleton();
        PipelineRegistry pipelineRegistry = (serverConfig == null) ? null : serverConfig.getPipelineRegistry();
        Pipeline lookupPipeline = null;

        if (this.store instanceof StoreAttributable) {

          StoreAttributable storeAttributable = (StoreAttributable) this.store;

          String pipelineName = storeAttributable.getAuthorityAttributes(parentAuthority).get(Pipeline.ATTRIBUTE_OVERRIDE_LOOKUP_PIPELINE);
          if (pipelineRegistry != null && pipelineName != null) lookupPipeline = pipelineRegistry.getPipelineByName(pipelineName);
        }

        if (pipelineRegistry != null && lookupPipeline == null) lookupPipeline = pipelineRegistry.getDefaultLookupPipeline();

        // execute LOOKUP pipeline

        xrd = lookupPipeline.execute(
            this.store,
            xrd,
            segment,
            parentAuthority,
            subSegmentName,
View Full Code Here

        // check if the authority overrides the LOOKUP pipeline. if not, use the default.

        ServerConfig serverConfig = ServerConfigFactory.getSingleton();
        PipelineRegistry pipelineRegistry = (serverConfig == null) ? null : serverConfig.getPipelineRegistry();
        Pipeline lookupPipeline = null;

        if (this.store instanceof StoreAttributable) {

          StoreAttributable storeAttributable = (StoreAttributable) this.store;

          String pipelineName = storeAttributable.getAuthorityAttributes(authority).get(Pipeline.ATTRIBUTE_OVERRIDE_LOOKUP_PIPELINE);
          if (pipelineRegistry != null && pipelineName != null) lookupPipeline = pipelineRegistry.getPipelineByName(pipelineName);
        }

        if (pipelineRegistry != null && lookupPipeline == null) lookupPipeline = pipelineRegistry.getDefaultLookupPipeline();

        // execute LOOKUP pipeline

        xrd = lookupPipeline.execute(
            this.store,
            xrd,
            null,
            null,
            subSegmentName,
View Full Code Here

    // use the default CREATE pipeline.

    ServerConfig serverConfig = ServerConfigFactory.getSingleton();
    PipelineRegistry pipelineRegistry = (serverConfig == null) ? null : serverConfig.getPipelineRegistry();
    Pipeline createPipeline = null;

    if (pipelineRegistry != null) createPipeline = pipelineRegistry.getDefaultCreatePipeline();

    // start database session

    Session session = this.getSessionFactory().getCurrentSession();

    // create authority

    DbAuthority authority;

    try {

      session.beginTransaction();

      authority = new DbAuthority();

      session.save(authority);
      session.flush();
      session.refresh(authority);
      session.getTransaction().commit();
    } catch (Exception ex) {

      log.error(ex);
      if (session.isOpen() && session.getTransaction().isActive()) session.getTransaction().rollback();
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // run XRD through the CREATE pipeline

    XRD newXRD;

    try {

      if (createPipeline != null) {

        newXRD = createPipeline.execute(this, xrd, null, null, null, authority, true);
      } else {

        newXRD = xrd;
      }
    } catch (Exception ex) {
View Full Code Here

    // use the default CREATE pipeline.

    ServerConfig serverConfig = ServerConfigFactory.getSingleton();
    PipelineRegistry pipelineRegistry = (serverConfig == null) ? null : serverConfig.getPipelineRegistry();
    Pipeline createPipeline = null;

    if (pipelineRegistry != null) createPipeline = pipelineRegistry.getDefaultCreatePipeline();

    // start database session

    Session session = this.getSessionFactory().getCurrentSession();

    // create root authority

    DbAuthority authority;

    try {

      session.beginTransaction();

      if (DbSubSegment.RootByName(session, name) != null) {

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

      authority = new DbAuthority();

      session.save(authority);
      session.flush();
      session.refresh(authority);
      session.getTransaction().commit();
    } catch (StoreException ex) {

      log.error(ex);
      if (session.isOpen() && session.getTransaction().isActive()) session.getTransaction().rollback();
      throw(ex);
    } catch (Exception ex) {

      log.error(ex);
      if (session.isOpen() && session.getTransaction().isActive()) session.getTransaction().rollback();
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // run XRD through the CREATE pipeline

    XRD newXRD;

    try {

      if (createPipeline != null) {

        newXRD = createPipeline.execute(this, xrd, null, null, null, authority, true);
      } else {

        newXRD = xrd;
      }
    } catch (Exception ex) {
View Full Code Here

    // check if the parent authority overrides the CREATE pipeline. if not, use the default.

    ServerConfig serverConfig = ServerConfigFactory.getSingleton();
    PipelineRegistry pipelineRegistry = (serverConfig == null) ? null : serverConfig.getPipelineRegistry();
    Pipeline createPipeline = null;

    String pipelineName = this.getAuthorityAttributes(parentAuthority).get(Pipeline.ATTRIBUTE_OVERRIDE_CREATE_PIPELINE);
    if (pipelineRegistry != null && pipelineName != null) createPipeline = pipelineRegistry.getPipelineByName(pipelineName);
    if (pipelineRegistry != null && createPipeline == null) createPipeline = pipelineRegistry.getDefaultCreatePipeline();

    // start database session

    Session session = this.getSessionFactory().getCurrentSession();

    // create authority

    DbAuthority authority;

    try {

      session.beginTransaction();

      reattach(session, parentAuthority);

      if (DbSubSegment.ByParentAndName(session, (DbAuthority) parentAuthority, subSegmentName) != null) {

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

      authority = new DbAuthority();

      session.save(authority);
      session.flush();
      session.refresh(authority);
      session.getTransaction().commit();
    } catch (StoreException ex) {

      log.error(ex);
      if (session.isOpen() && session.getTransaction().isActive()) session.getTransaction().rollback();
      throw(ex);
    } catch (Exception ex) {

      log.error(ex);
      if (session.isOpen() && session.getTransaction().isActive()) session.getTransaction().rollback();
      throw new StoreInternalException(ex, "Cannot access database.");
    }

    // run XRD through the CREATE pipeline

    XRD newXRD;

    try {

      if (createPipeline != null) {

        newXRD = createPipeline.execute(this, xrd, null, parentAuthority, subSegmentName, authority, true);
      } else {

        newXRD = xrd;
      }
    } catch (Exception ex) {
View Full Code Here

        }

        // check if the authority overrides the LOOKUP pipeline. if not, use the default.

        PipelineRegistry pipelineRegistry = (this.serverConfig == null) ? null : this.serverConfig.getPipelineRegistry();
        Pipeline lookupPipeline = null;

        if (this.store instanceof StoreAttributable) {

          StoreAttributable storeAttributable = (StoreAttributable) this.store;

          String pipelineName = storeAttributable.getAuthorityAttributes(namespaceAuthority).get(Pipeline.ATTRIBUTE_OVERRIDE_LOOKUP_PIPELINE);
          if (pipelineRegistry != null && pipelineName != null) lookupPipeline = pipelineRegistry.getPipelineByName(pipelineName);
        }

        if (pipelineRegistry != null && lookupPipeline == null) lookupPipeline = pipelineRegistry.getDefaultLookupPipeline();

        // execute LOOKUP pipeline

        xrd = lookupPipeline.execute(
            this.store,
            xrd,
            null,
            null,
            namespace,
View Full Code Here

        }

        // check if the parent authority overrides the LOOKUP pipeline. if not, use the default.

        PipelineRegistry pipelineRegistry = (this.serverConfig == null) ? null : this.serverConfig.getPipelineRegistry();
        Pipeline lookupPipeline = null;

        if (this.store instanceof StoreAttributable) {

          StoreAttributable storeAttributable = (StoreAttributable) this.store;

          String pipelineName = storeAttributable.getAuthorityAttributes(parentAuthority).get(Pipeline.ATTRIBUTE_OVERRIDE_LOOKUP_PIPELINE);
          if (pipelineRegistry != null && pipelineName != null) lookupPipeline = pipelineRegistry.getPipelineByName(pipelineName);
        }

        if (pipelineRegistry != null && lookupPipeline == null) lookupPipeline = pipelineRegistry.getDefaultLookupPipeline();

        // execute LOOKUP pipeline

        xrd = lookupPipeline.execute(
            this.store,
            xrd,
            segment,
            parentAuthority,
            subSegmentName,
View Full Code Here

TOP

Related Classes of org.openxri.pipeline.Pipeline

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.