virtual bool finalizeOptions(IProperties *globals) { if (!optVersionStr.isEmpty()) { optVersion = atof( optVersionStr.get() ); if( optVersion <= 0 ) { throw MakeStringException( 0, "Version option must be followed by a real number > 0" ); } } else { fprintf(stderr, "\nWARNING: ESDL Version not specified.\n"); } if (optSource.isEmpty()) throw MakeStringException( 0, "Source ESDL XML definition file must be provided" ); if (optService.isEmpty()) throw MakeStringException( 0, "Name of ESDL based service must be provided" ); if (optWSProcAddress.isEmpty()) throw MakeStringException( 0, "Server address of ESDL process server must be provided" ); if (optWSProcPort.isEmpty()) throw MakeStringException( 0, "Port on which ESDL process is listening must be provided" ); return true; }
virtual bool finalizeOptions(IProperties *globals) { if (optWSProcAddress.isEmpty()) throw MakeStringException( 0, "Server address of WsESDLConfig process server must be provided" ); if (optWSProcPort.isEmpty()) throw MakeStringException( 0, "Port on which WsESDLConfig is listening must be provided" ); return true; }
bool finalizeOptions(IProperties *globals) { if (optInput.length()) { const char *in = optInput.get(); while (*in && isspace(*in)) in++; if (*in!='<') { StringBuffer content; content.loadFile(in); optInput.set(content.str()); } } if (optESDLDefID.isEmpty()) throw MakeStringException( 0, "ESDL definition ID must be provided!" ); if (optESDLService.isEmpty()) throw MakeStringException( 0, "ESDL service definition name must be provided!" ); if(optTargetESPProcName.isEmpty()) throw MakeStringException( 0, "Name of Target ESP process must be provided!" ); if (optPortOrName.isEmpty()) throw MakeStringException( 0, "Either the target ESP service port of name must be provided!" ); else { const char * portorname = optPortOrName.get(); isdigit(*portorname) ? optTargetPort.set(portorname) : optService.set(portorname); } return EsdlPublishCmdCommon::finalizeOptions(globals); }
bool finalizeOptions(IProperties *globals) { if (optInput.length()) { const char *in = optInput.get(); while (*in && isspace(*in)) in++; if (*in!='<') { StringBuffer content; content.loadFile(in); optInput.set(content.str()); } } if (!optVersionStr.isEmpty()) { optVersion = atof( optVersionStr.get() ); if( optVersion <= 0 ) { throw MakeStringException( 0, "Version option must be followed by a real number > 0" ); } } else throw MakeStringException( 0, "ESDL service definition version must be provided!" ); if(optTargetESPProcName.isEmpty()) throw MakeStringException( 0, "Name of Target ESP process must be provided" ); if (optService.isEmpty()) throw MakeStringException( 0, "Name of ESDL based service must be provided" ); if (optWSProcAddress.isEmpty()) throw MakeStringException( 0, "Server address of ESDL process server must be provided" ); if (optWSProcPort.isEmpty()) throw MakeStringException( 0, "Port on which ESDL process is listening must be provided" ); if (optMethod.isEmpty()) throw MakeStringException( 0, "Name of ESDL based method must be provided" ); if (optBindingName.isEmpty()) throw MakeStringException( 0, "Name of ESP binding must be provided" ); return true; }
bool finalizeOptions(IProperties *globals) { if (optTargetESPProcName.isEmpty()) throw MakeStringException( 0, "Name of Target ESP process must be provided!" ); if (optEspBinding.isEmpty()) throw MakeStringException( 0, "Target ESP Binding must be provided!" ); return EsdlPublishCmdCommon::finalizeOptions(globals); }
bool CPackageNode::validate(StringArray &warn, StringArray &err) const { if (!node) return true; StringAttr packageId = node->queryProp("@id"); if (packageId.isEmpty()) err.append("Package has no id attribute"); Owned<IPropertyTreeIterator> files = node->getElements("SuperFile"); ForEach(*files) { IPropertyTree &super = files->query(); StringAttr superId = super.queryProp("@id"); if (superId.isEmpty()) err.append("SuperFile has no id attribute"); if (!super.hasProp("SubFile")) { VStringBuffer msg("Package['%s']/SuperFile['%s'] has no SubFiles defined", packageId.str(), superId.str()); warn.append(msg.str()); } } return true; }
void setPMID(const char *_target, const char *name, bool globalScope) { if (!name || !*name) throw MakeStringExceptionDirect(PKG_MISSING_PARAM, "PackageMap name parameter required"); if (!globalScope) { target.set(_target); if (target.isEmpty()) throw MakeStringExceptionDirect(PKG_MISSING_PARAM, "Target cluster parameter required"); ensureClusterInfo(); pmid.append(target).append("::"); } pmid.append(name); pmid.toLowerCase(); }
void init() { StringBuffer xpath("Software/ThorCluster[@name=\""); xpath.append(clusterName).append("\"]"); Owned<IRemoteConnection> conn = querySDS().connect("/Environment", myProcessSession(), RTM_LOCK_READ, SDS_LOCK_TIMEOUT); environment.setown(createPTreeFromIPT(conn->queryRoot())); options = environment->queryPropTree(xpath.str()); if (!options) throwUnexpected(); groupName.set(options->queryProp("@nodeGroup")); if (groupName.isEmpty()) groupName.set(options->queryProp("@name")); VStringBuffer spareS("%s_spares", groupName.get()); spareGroupName.set(spareS); group.setown(queryNamedGroupStore().lookup(groupName)); spareGroup.setown(queryNamedGroupStore().lookup(spareGroupName)); }
bool finalizeOptions(IProperties *globals) { if (optInput.length()) { const char *in = optInput.get(); while (*in && isspace(*in)) in++; if (*in!='<') { StringBuffer content; content.loadFile(in); optInput.set(content.str()); } } if (optESDLDefID.isEmpty()) throw MakeStringException( 0, "ESDL definition ID must be provided!" ); if (optESDLService.isEmpty()) throw MakeStringException( 0, "ESDL service definition name must be provided!" ); if(optTargetESPProcName.isEmpty()) throw MakeStringException( 0, "Name of Target ESP process must be provided!" ); if (optPortOrName.isEmpty()) throw MakeStringException( 0, "Either the target ESP service port of name must be provided!" ); else { const char * portorname = optPortOrName.get(); isdigit(*portorname) ? optTargetPort.set(portorname) : optService.set(portorname); } if (optWSProcAddress.isEmpty()) throw MakeStringException( 0, "Server address of ESDL process server must be provided" ); if (optWSProcPort.isEmpty()) throw MakeStringException( 0, "Port on which ESDL process is listening must be provided" ); return true; }