public void addModel(Object resolved, ProcessorContext context) { BPELProcessDefinition process = (BPELProcessDefinition)resolved; map.put(process.getName(), process); }
public void addModel(Object resolved, ProcessorContext context) { BPELProcessDefinition process = (BPELProcessDefinition)resolved; map.put(process.getName(), process); }
public Object removeModel(Object resolved, ProcessorContext context) { return map.remove(((BPELProcessDefinition)resolved).getName()); }
public Object removeModel(Object resolved, ProcessorContext context) { return map.remove(((BPELProcessDefinition)resolved).getName()); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj instanceof BPELProcessDefinition) { if (getName() != null) { return getName().equals(((BPELProcessDefinition)obj).getName()); } else { return ((BPELProcessDefinition)obj).getName() == null; } } else { return false; } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj instanceof BPELProcessDefinition) { if (getName() != null) { return getName().equals(((BPELProcessDefinition)obj).getName()); } else { return ((BPELProcessDefinition)obj).getName() == null; } } else { return false; } }
/** * Returns an InputStream containing the Compiled BPEL Process (CBP) */ public InputStream getCBPInputStream() { //System.out.println("getCBPInputStream called"); File cbpFile = getCBPFile(); if( cbpFile == null ) return null; if( cbpFile.exists() ) { // Create an InputStream from the cbp file... try { return new FileInputStream( cbpFile ); } catch ( Exception e ) { if(__log.isDebugEnabled()) { __log.debug("Unable to open the cbp file for BPEL process: " + implementation.getProcessDefinition().getName(), e); } } // end try } else { // Cannot find the cbp file if(__log.isWarnEnabled()){ __log.warn("Cannot find the cbp file for process: " + implementation.getProcessDefinition().getName()); } } // end if // TODO - need better exception handling if we can't open the cbp file for any reason return null; } // end getCBPInputStream
/** * Gets the File object for the CBP file for this BPEL Process * @return - the File object for the CBP file */ private File getCBPFile() { // Find the CBP file - it has the same name as the BPEL process and lives in the same // directory as the process file String cbpFileName = null; try { String fileName = getRelativePath( getDirectory(), getBPELFile() ); cbpFileName = fileName.substring(0, fileName.lastIndexOf(".")) + ".cbp"; } catch (Exception e ) { // IOException trying to fetch the BPEL file name if(__log.isDebugEnabled()) { __log.debug("Unable to calculate the file name for BPEL process: " + implementation.getProcessDefinition().getName(), e); return null; } // end if } // end try File cbpFile = new File( getDirectory(), cbpFileName ); return cbpFile; } // end getCBPFile
public <T> T resolveModel(Class<T> modelClass, T unresolved, ProcessorContext context) { BPELProcessDefinition resolved = null; QName qname = ((BPELProcessDefinition)unresolved).getName();
public <T> T resolveModel(Class<T> modelClass, T unresolved, ProcessorContext context) { BPELProcessDefinition resolved = null; QName qname = ((BPELProcessDefinition)unresolved).getName();
public void resolve(BPELImplementation implementation, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { if( implementation != null && implementation.isUnresolved()) { implementation.setModelResolver(resolver); BPELProcessDefinition processDefinition = resolveBPELProcessDefinition(implementation, resolver, context); //resolveBPELImports(processDefinition, resolver); if(processDefinition.isUnresolved()) { error(context.getMonitor(), "BPELProcessNotFound", implementation, processDefinition.getName()); } else { implementation.setProcessDefinition(processDefinition); // Get the component type from the process definition generateComponentType( implementation, context.getMonitor() ); //set current implementation resolved implementation.setUnresolved(false); } } } // end resolve
public void resolve(BPELImplementation implementation, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { if( implementation != null && implementation.isUnresolved()) { implementation.setModelResolver(resolver); BPELProcessDefinition processDefinition = resolveBPELProcessDefinition(implementation, resolver, context); //resolveBPELImports(processDefinition, resolver); if(processDefinition.isUnresolved()) { error(context.getMonitor(), "BPELProcessNotFound", implementation, processDefinition.getName()); } else { implementation.setProcessDefinition(processDefinition); // Get the component type from the process definition generateComponentType( implementation, context.getMonitor() ); //set current implementation resolved implementation.setUnresolved(false); } } } // end resolve