repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/TaskWorkflowHelper.java | TaskWorkflowHelper.filterStandardActions | public List<TaskAction> filterStandardActions(List<TaskAction> standardTaskActions)
throws ServiceException, DataAccessException {
CodeTimer timer = new CodeTimer("TaskManager.filterStandardTaskActions()", true);
List<TaskAction> filteredTaskActions = standardTaskActions;
try {
... | java | public List<TaskAction> filterStandardActions(List<TaskAction> standardTaskActions)
throws ServiceException, DataAccessException {
CodeTimer timer = new CodeTimer("TaskManager.filterStandardTaskActions()", true);
List<TaskAction> filteredTaskActions = standardTaskActions;
try {
... | [
"public",
"List",
"<",
"TaskAction",
">",
"filterStandardActions",
"(",
"List",
"<",
"TaskAction",
">",
"standardTaskActions",
")",
"throws",
"ServiceException",
",",
"DataAccessException",
"{",
"CodeTimer",
"timer",
"=",
"new",
"CodeTimer",
"(",
"\"TaskManager.filter... | Filters according to what's applicable
depending on the context of the task activity instance.
@param standardTaskActions unfiltered list
@return the list of task actions | [
"Filters",
"according",
"to",
"what",
"s",
"applicable",
"depending",
"on",
"the",
"context",
"of",
"the",
"task",
"activity",
"instance",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/TaskWorkflowHelper.java#L1158-L1220 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/TaskWorkflowHelper.java | TaskWorkflowHelper.getCustomActions | public List<TaskAction> getCustomActions()
throws ServiceException, DataAccessException {
CodeTimer timer = new CodeTimer("getCustomActions()", true);
List<TaskAction> dynamicTaskActions = new ArrayList<TaskAction>();
try {
ActivityInstance activityInstance = getActivityInstanc... | java | public List<TaskAction> getCustomActions()
throws ServiceException, DataAccessException {
CodeTimer timer = new CodeTimer("getCustomActions()", true);
List<TaskAction> dynamicTaskActions = new ArrayList<TaskAction>();
try {
ActivityInstance activityInstance = getActivityInstanc... | [
"public",
"List",
"<",
"TaskAction",
">",
"getCustomActions",
"(",
")",
"throws",
"ServiceException",
",",
"DataAccessException",
"{",
"CodeTimer",
"timer",
"=",
"new",
"CodeTimer",
"(",
"\"getCustomActions()\"",
",",
"true",
")",
";",
"List",
"<",
"TaskAction",
... | Gets the custom task actions associated with a task instance as determined by
the result codes for the possible outgoing work transitions from the associated
activity.
@return the list of task actions | [
"Gets",
"the",
"custom",
"task",
"actions",
"associated",
"with",
"a",
"task",
"instance",
"as",
"determined",
"by",
"the",
"result",
"codes",
"for",
"the",
"possible",
"outgoing",
"work",
"transitions",
"from",
"the",
"associated",
"activity",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/TaskWorkflowHelper.java#L1229-L1268 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/routing/RoutingServiceMonitor.java | RoutingServiceMonitor.getRoutingStrategyDestination | protected URL getRoutingStrategyDestination(Object request, Map<String,String> headers) {
for (RequestRoutingStrategy routingStrategy : MdwServiceRegistry.getInstance().getRequestRoutingStrategies()) {
URL destination = routingStrategy.getDestination(request, headers);
if (destination !=... | java | protected URL getRoutingStrategyDestination(Object request, Map<String,String> headers) {
for (RequestRoutingStrategy routingStrategy : MdwServiceRegistry.getInstance().getRequestRoutingStrategies()) {
URL destination = routingStrategy.getDestination(request, headers);
if (destination !=... | [
"protected",
"URL",
"getRoutingStrategyDestination",
"(",
"Object",
"request",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"for",
"(",
"RequestRoutingStrategy",
"routingStrategy",
":",
"MdwServiceRegistry",
".",
"getInstance",
"(",
")",
"."... | Returns an instance of the first applicable routing strategy found based on priority of each strategy, or null if none return a URL. | [
"Returns",
"an",
"instance",
"of",
"the",
"first",
"applicable",
"routing",
"strategy",
"found",
"based",
"on",
"priority",
"of",
"each",
"strategy",
"or",
"null",
"if",
"none",
"return",
"a",
"URL",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/routing/RoutingServiceMonitor.java#L138-L163 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/user/UserServicesImpl.java | UserServicesImpl.getUser | public User getUser(String cuid) {
User user = UserGroupCache.getUser(cuid);
if (user == null)
return null;
// add empty attributes
if (user.getAttributes() == null)
user.setAttributes(new HashMap<String,String>());
for (String name : UserGroupCache.getUse... | java | public User getUser(String cuid) {
User user = UserGroupCache.getUser(cuid);
if (user == null)
return null;
// add empty attributes
if (user.getAttributes() == null)
user.setAttributes(new HashMap<String,String>());
for (String name : UserGroupCache.getUse... | [
"public",
"User",
"getUser",
"(",
"String",
"cuid",
")",
"{",
"User",
"user",
"=",
"UserGroupCache",
".",
"getUser",
"(",
"cuid",
")",
";",
"if",
"(",
"user",
"==",
"null",
")",
"return",
"null",
";",
"// add empty attributes",
"if",
"(",
"user",
".",
... | Does not include non-public attributes.
Includes empty values for all public attributes. | [
"Does",
"not",
"include",
"non",
"-",
"public",
"attributes",
".",
"Includes",
"empty",
"values",
"for",
"all",
"public",
"attributes",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/user/UserServicesImpl.java#L89-L112 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/xml/XmlBeanWrapper.java | XmlBeanWrapper.validate | public boolean validate() {
_validationError = null;
List<XmlError> errors = new ArrayList<XmlError>();
boolean valid = _xmlBean.validate(new XmlOptions().setErrorListener(errors));
if (!valid) {
_validationError = "";
for (int i = 0; i < errors.size(); i++) {
... | java | public boolean validate() {
_validationError = null;
List<XmlError> errors = new ArrayList<XmlError>();
boolean valid = _xmlBean.validate(new XmlOptions().setErrorListener(errors));
if (!valid) {
_validationError = "";
for (int i = 0; i < errors.size(); i++) {
... | [
"public",
"boolean",
"validate",
"(",
")",
"{",
"_validationError",
"=",
"null",
";",
"List",
"<",
"XmlError",
">",
"errors",
"=",
"new",
"ArrayList",
"<",
"XmlError",
">",
"(",
")",
";",
"boolean",
"valid",
"=",
"_xmlBean",
".",
"validate",
"(",
"new",
... | Performs validation on the XmlBean, populating the error message if failed.
@return false if the XmlBean is invalid (error message is available in getValidationError()). | [
"Performs",
"validation",
"on",
"the",
"XmlBean",
"populating",
"the",
"error",
"message",
"if",
"failed",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/xml/XmlBeanWrapper.java#L122-L137 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/cli/Main.java | Main.getMonitor | static ProgressMonitor getMonitor() {
return new ProgressMonitor() {
@Override
public void message(String msg) {
System.out.println(msg + "...");
}
@Override
public void progress(int prog) {
if ("\\".equals(System.getP... | java | static ProgressMonitor getMonitor() {
return new ProgressMonitor() {
@Override
public void message(String msg) {
System.out.println(msg + "...");
}
@Override
public void progress(int prog) {
if ("\\".equals(System.getP... | [
"static",
"ProgressMonitor",
"getMonitor",
"(",
")",
"{",
"return",
"new",
"ProgressMonitor",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"message",
"(",
"String",
"msg",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"msg",
"+",
"\"...\"",
"... | Every call with >= 100% progress will print a new line. | [
"Every",
"call",
"with",
">",
"=",
"100%",
"progress",
"will",
"print",
"a",
"new",
"line",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Main.java#L133-L158 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/project/Data.java | Data.getExcludedTables | public List<String> getExcludedTables() {
List<String> dbTables = project.readDataList("data.excluded.tables");
if (dbTables == null)
dbTables = DEFAULT_EXCLUDED_TABLES;
return dbTables;
} | java | public List<String> getExcludedTables() {
List<String> dbTables = project.readDataList("data.excluded.tables");
if (dbTables == null)
dbTables = DEFAULT_EXCLUDED_TABLES;
return dbTables;
} | [
"public",
"List",
"<",
"String",
">",
"getExcludedTables",
"(",
")",
"{",
"List",
"<",
"String",
">",
"dbTables",
"=",
"project",
".",
"readDataList",
"(",
"\"data.excluded.tables\"",
")",
";",
"if",
"(",
"dbTables",
"==",
"null",
")",
"dbTables",
"=",
"DE... | Tables excluded from export which need to be purged on import. | [
"Tables",
"excluded",
"from",
"export",
"which",
"need",
"to",
"be",
"purged",
"on",
"import",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/project/Data.java#L208-L213 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/Roles.java | Roles.get | @Override
@Path("/{roleName}")
@ApiOperation(value="Retrieve a role or all roles",
notes="If roleName is not present, returns all roles.",
response=Role.class, responseContainer="List")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
... | java | @Override
@Path("/{roleName}")
@ApiOperation(value="Retrieve a role or all roles",
notes="If roleName is not present, returns all roles.",
response=Role.class, responseContainer="List")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{roleName}\"",
")",
"@",
"ApiOperation",
"(",
"value",
"=",
"\"Retrieve a role or all roles\"",
",",
"notes",
"=",
"\"If roleName is not present, returns all roles.\"",
",",
"response",
"=",
"Role",
".",
"class",
",",
"responseCo... | Retrieve a user role or the list of all roles. | [
"Retrieve",
"a",
"user",
"role",
"or",
"the",
"list",
"of",
"all",
"roles",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Roles.java#L75-L100 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/cache/impl/PackageCache.java | PackageCache.getProcessPackage | public static Package getProcessPackage(Long processId) {
try {
if (processId != null) {
for (Package pkg : getPackageList()) {
if (pkg.containsProcess(processId))
return pkg;
}
}
return Package.getDefaul... | java | public static Package getProcessPackage(Long processId) {
try {
if (processId != null) {
for (Package pkg : getPackageList()) {
if (pkg.containsProcess(processId))
return pkg;
}
}
return Package.getDefaul... | [
"public",
"static",
"Package",
"getProcessPackage",
"(",
"Long",
"processId",
")",
"{",
"try",
"{",
"if",
"(",
"processId",
"!=",
"null",
")",
"{",
"for",
"(",
"Package",
"pkg",
":",
"getPackageList",
"(",
")",
")",
"{",
"if",
"(",
"pkg",
".",
"contain... | Returns the design-time package for a specified process ID.
Returns the first match so does not support the same process in multiple packages.
Also, assumes the processId is not for an embedded subprocess. | [
"Returns",
"the",
"design",
"-",
"time",
"package",
"for",
"a",
"specified",
"process",
"ID",
".",
"Returns",
"the",
"first",
"match",
"so",
"does",
"not",
"support",
"the",
"same",
"process",
"in",
"multiple",
"packages",
".",
"Also",
"assumes",
"the",
"p... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cache/impl/PackageCache.java#L151-L165 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/cache/impl/PackageCache.java | PackageCache.getTaskTemplatePackage | public static Package getTaskTemplatePackage(Long taskId) {
try {
for (Package pkg : getPackageList()) {
if (pkg.containsTaskTemplate(taskId))
return pkg;
}
return Package.getDefaultPackage();
}
catch (CachingException ex) {
... | java | public static Package getTaskTemplatePackage(Long taskId) {
try {
for (Package pkg : getPackageList()) {
if (pkg.containsTaskTemplate(taskId))
return pkg;
}
return Package.getDefaultPackage();
}
catch (CachingException ex) {
... | [
"public",
"static",
"Package",
"getTaskTemplatePackage",
"(",
"Long",
"taskId",
")",
"{",
"try",
"{",
"for",
"(",
"Package",
"pkg",
":",
"getPackageList",
"(",
")",
")",
"{",
"if",
"(",
"pkg",
".",
"containsTaskTemplate",
"(",
"taskId",
")",
")",
"return",... | Returns the design-time package for a specified task ID.
Returns the first match so does not support the same template in multiple packages. | [
"Returns",
"the",
"design",
"-",
"time",
"package",
"for",
"a",
"specified",
"task",
"ID",
".",
"Returns",
"the",
"first",
"match",
"so",
"does",
"not",
"support",
"the",
"same",
"template",
"in",
"multiple",
"packages",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cache/impl/PackageCache.java#L171-L183 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/dataaccess/AssetRef.java | AssetRef.getPath | public String getPath() {
Matcher matcher = pathPattern.matcher(name);
if (matcher.find()) {
String match = matcher.group(1);
int lastDot = match.lastIndexOf('.');
if (lastDot == -1)
throw new IllegalStateException("Bad asset path: " + match);
... | java | public String getPath() {
Matcher matcher = pathPattern.matcher(name);
if (matcher.find()) {
String match = matcher.group(1);
int lastDot = match.lastIndexOf('.');
if (lastDot == -1)
throw new IllegalStateException("Bad asset path: " + match);
... | [
"public",
"String",
"getPath",
"(",
")",
"{",
"Matcher",
"matcher",
"=",
"pathPattern",
".",
"matcher",
"(",
"name",
")",
";",
"if",
"(",
"matcher",
".",
"find",
"(",
")",
")",
"{",
"String",
"match",
"=",
"matcher",
".",
"group",
"(",
"1",
")",
";... | File path corresponding to name. | [
"File",
"path",
"corresponding",
"to",
"name",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/dataaccess/AssetRef.java#L57-L69 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/zipkin/TraceServiceMonitor.java | TraceServiceMonitor.onRequest | @Override
public Object onRequest(Object request, Map<String,String> headers) {
if (headers.containsKey(Listener.METAINFO_HTTP_METHOD)) {
Tracing tracing = TraceHelper.getTracing("mdw-service");
HttpTracing httpTracing = HttpTracing.create(tracing);
handler = HttpServerHa... | java | @Override
public Object onRequest(Object request, Map<String,String> headers) {
if (headers.containsKey(Listener.METAINFO_HTTP_METHOD)) {
Tracing tracing = TraceHelper.getTracing("mdw-service");
HttpTracing httpTracing = HttpTracing.create(tracing);
handler = HttpServerHa... | [
"@",
"Override",
"public",
"Object",
"onRequest",
"(",
"Object",
"request",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"if",
"(",
"headers",
".",
"containsKey",
"(",
"Listener",
".",
"METAINFO_HTTP_METHOD",
")",
")",
"{",
"Tracing"... | Only for HTTP services. | [
"Only",
"for",
"HTTP",
"services",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/zipkin/TraceServiceMonitor.java#L28-L39 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/process/ProcessCache.java | ProcessCache.getProcessesSmart | public static List<Process> getProcessesSmart(AssetVersionSpec spec) throws DataAccessException {
if (spec.getPackageName() == null)
throw new DataAccessException("Spec must be package-qualified: " + spec);
List<Process> matches = new ArrayList<>();
for (Process process : getAllProce... | java | public static List<Process> getProcessesSmart(AssetVersionSpec spec) throws DataAccessException {
if (spec.getPackageName() == null)
throw new DataAccessException("Spec must be package-qualified: " + spec);
List<Process> matches = new ArrayList<>();
for (Process process : getAllProce... | [
"public",
"static",
"List",
"<",
"Process",
">",
"getProcessesSmart",
"(",
"AssetVersionSpec",
"spec",
")",
"throws",
"DataAccessException",
"{",
"if",
"(",
"spec",
".",
"getPackageName",
"(",
")",
"==",
"null",
")",
"throw",
"new",
"DataAccessException",
"(",
... | Find all definitions matching the specified version spec. Returns shallow processes. | [
"Find",
"all",
"definitions",
"matching",
"the",
"specified",
"version",
"spec",
".",
"Returns",
"shallow",
"processes",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/process/ProcessCache.java#L189-L200 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/container/plugin/activemq/ActiveMqJms.java | ActiveMqJms.retrieveConnectionFactory | protected ConnectionFactory retrieveConnectionFactory(String name) throws JMSException {
if (name == null && defaultConnectionFactory != null) {
return defaultConnectionFactory; // injected
}
else {
try {
// autowiring did not occur
return ... | java | protected ConnectionFactory retrieveConnectionFactory(String name) throws JMSException {
if (name == null && defaultConnectionFactory != null) {
return defaultConnectionFactory; // injected
}
else {
try {
// autowiring did not occur
return ... | [
"protected",
"ConnectionFactory",
"retrieveConnectionFactory",
"(",
"String",
"name",
")",
"throws",
"JMSException",
"{",
"if",
"(",
"name",
"==",
"null",
"&&",
"defaultConnectionFactory",
"!=",
"null",
")",
"{",
"return",
"defaultConnectionFactory",
";",
"// injected... | Pooling and remote queues are configured via Spring in broker config XML. | [
"Pooling",
"and",
"remote",
"queues",
"are",
"configured",
"via",
"Spring",
"in",
"broker",
"config",
"XML",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/container/plugin/activemq/ActiveMqJms.java#L92-L106 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java | ProcessEngineDriver.getPackageHandler | private Process getPackageHandler(ProcessInstance masterInstance, Integer eventType) {
Process process = getProcessDefinition(masterInstance);
Process handler = getPackageHandler(process.getPackageName(), eventType);
if (handler != null && handler.getName().equals(process.getName())) {
... | java | private Process getPackageHandler(ProcessInstance masterInstance, Integer eventType) {
Process process = getProcessDefinition(masterInstance);
Process handler = getPackageHandler(process.getPackageName(), eventType);
if (handler != null && handler.getName().equals(process.getName())) {
... | [
"private",
"Process",
"getPackageHandler",
"(",
"ProcessInstance",
"masterInstance",
",",
"Integer",
"eventType",
")",
"{",
"Process",
"process",
"=",
"getProcessDefinition",
"(",
"masterInstance",
")",
";",
"Process",
"handler",
"=",
"getPackageHandler",
"(",
"proces... | Finds the relevant package handler for a master process instance. | [
"Finds",
"the",
"relevant",
"package",
"handler",
"for",
"a",
"master",
"process",
"instance",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java#L233-L241 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java | ProcessEngineDriver.invokeService | public String invokeService(Long processId, String ownerType,
Long ownerId, String masterRequestId, String masterRequest,
Map<String,String> parameters, String responseVarName, Map<String,String> headers) throws Exception {
return invokeService(processId, ownerType, ownerId, masterReques... | java | public String invokeService(Long processId, String ownerType,
Long ownerId, String masterRequestId, String masterRequest,
Map<String,String> parameters, String responseVarName, Map<String,String> headers) throws Exception {
return invokeService(processId, ownerType, ownerId, masterReques... | [
"public",
"String",
"invokeService",
"(",
"Long",
"processId",
",",
"String",
"ownerType",
",",
"Long",
"ownerId",
",",
"String",
"masterRequestId",
",",
"String",
"masterRequest",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
",",
"String",
"re... | Invoke a real-time service process.
@return the service response | [
"Invoke",
"a",
"real",
"-",
"time",
"service",
"process",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java#L695-L699 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java | ProcessEngineDriver.invokeServiceAsSubprocess | public Map<String,String> invokeServiceAsSubprocess(Long processId,
Long parentProcInstId, String masterRequestId, Map<String,String> parameters,
int performance_level) throws Exception
{
long startMilli = System.currentTimeMillis();
if (performance_level<=0) performance_leve... | java | public Map<String,String> invokeServiceAsSubprocess(Long processId,
Long parentProcInstId, String masterRequestId, Map<String,String> parameters,
int performance_level) throws Exception
{
long startMilli = System.currentTimeMillis();
if (performance_level<=0) performance_leve... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"invokeServiceAsSubprocess",
"(",
"Long",
"processId",
",",
"Long",
"parentProcInstId",
",",
"String",
"masterRequestId",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
",",
"int",
"performance_le... | Called internally by invoke subprocess activities to call service processes as
subprocesses of regular processes.
@return map of output parameters (can be empty hash, but not null); | [
"Called",
"internally",
"by",
"invoke",
"subprocess",
"activities",
"to",
"call",
"service",
"processes",
"as",
"subprocesses",
"of",
"regular",
"processes",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java#L780-L801 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java | ProcessEngineDriver.executeServiceProcess | private ProcessInstance executeServiceProcess(ProcessExecutor engine, Long processId,
String ownerType, Long ownerId, String masterRequestId, Map<String,String> parameters,
String secondaryOwnerType, Long secondaryOwnerId, Map<String,String> headers) throws Exception {
Process procdef = ... | java | private ProcessInstance executeServiceProcess(ProcessExecutor engine, Long processId,
String ownerType, Long ownerId, String masterRequestId, Map<String,String> parameters,
String secondaryOwnerType, Long secondaryOwnerId, Map<String,String> headers) throws Exception {
Process procdef = ... | [
"private",
"ProcessInstance",
"executeServiceProcess",
"(",
"ProcessExecutor",
"engine",
",",
"Long",
"processId",
",",
"String",
"ownerType",
",",
"Long",
"ownerId",
",",
"String",
"masterRequestId",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
",... | execute service process using asynch engine | [
"execute",
"service",
"process",
"using",
"asynch",
"engine"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java#L806-L840 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java | ProcessEngineDriver.startProcess | public Long startProcess(Long processId, String masterRequestId, String ownerType,
Long ownerId, Map<String,String> vars, Map<String,String> headers) throws Exception {
return startProcess(processId, masterRequestId, ownerType, ownerId, vars, null, null, headers);
} | java | public Long startProcess(Long processId, String masterRequestId, String ownerType,
Long ownerId, Map<String,String> vars, Map<String,String> headers) throws Exception {
return startProcess(processId, masterRequestId, ownerType, ownerId, vars, null, null, headers);
} | [
"public",
"Long",
"startProcess",
"(",
"Long",
"processId",
",",
"String",
"masterRequestId",
",",
"String",
"ownerType",
",",
"Long",
"ownerId",
",",
"Map",
"<",
"String",
",",
"String",
">",
"vars",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers... | Start a process.
@param processId
@param masterRequestId
@param ownerType
@param ownerId
@param vars Input parameter bindings for the process instance to be created
@param headers
@return the process instance ID | [
"Start",
"a",
"process",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java#L921-L924 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java | ProcessEngineDriver.startProcess | public Long startProcess(Long processId, String masterRequestId, String ownerType,
Long ownerId, Map<String,String> vars,
String secondaryOwnerType, Long secondaryOwnerId, Map<String,String> headers) throws Exception {
Process procdef = getProcessDefinition(processId);
int perfor... | java | public Long startProcess(Long processId, String masterRequestId, String ownerType,
Long ownerId, Map<String,String> vars,
String secondaryOwnerType, Long secondaryOwnerId, Map<String,String> headers) throws Exception {
Process procdef = getProcessDefinition(processId);
int perfor... | [
"public",
"Long",
"startProcess",
"(",
"Long",
"processId",
",",
"String",
"masterRequestId",
",",
"String",
"ownerType",
",",
"Long",
"ownerId",
",",
"Map",
"<",
"String",
",",
"String",
">",
"vars",
",",
"String",
"secondaryOwnerType",
",",
"Long",
"secondar... | Starting a regular process.
@param processId ID of the process to be started
@param masterRequestId
@param ownerType
@param ownerId
@param vars Input parameter bindings for the process instance to be created
@return Process instance ID | [
"Starting",
"a",
"regular",
"process",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java#L935-L964 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/cache/impl/AssetCache.java | AssetCache.getAsset | public static Asset getAsset(AssetVersionSpec spec, Map<String,String> attributeValues) {
Asset match = null;
try {
for (Asset asset : getAllAssets()) {
if (spec.getName().equals(asset.getName())) {
if (asset.meetsVersionSpec(spec.getVersion()) && (match =... | java | public static Asset getAsset(AssetVersionSpec spec, Map<String,String> attributeValues) {
Asset match = null;
try {
for (Asset asset : getAllAssets()) {
if (spec.getName().equals(asset.getName())) {
if (asset.meetsVersionSpec(spec.getVersion()) && (match =... | [
"public",
"static",
"Asset",
"getAsset",
"(",
"AssetVersionSpec",
"spec",
",",
"Map",
"<",
"String",
",",
"String",
">",
"attributeValues",
")",
"{",
"Asset",
"match",
"=",
"null",
";",
"try",
"{",
"for",
"(",
"Asset",
"asset",
":",
"getAllAssets",
"(",
... | Get the asset based on version spec whose name and custom attributes match the parameters. | [
"Get",
"the",
"asset",
"based",
"on",
"version",
"spec",
"whose",
"name",
"and",
"custom",
"attributes",
"match",
"the",
"parameters",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cache/impl/AssetCache.java#L191-L221 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/cache/impl/AssetCache.java | AssetCache.getJarAssets | public static synchronized List<Asset> getJarAssets() {
if (jarAssets == null) {
jarAssets = getAssets(Asset.JAR);
}
return jarAssets;
} | java | public static synchronized List<Asset> getJarAssets() {
if (jarAssets == null) {
jarAssets = getAssets(Asset.JAR);
}
return jarAssets;
} | [
"public",
"static",
"synchronized",
"List",
"<",
"Asset",
">",
"getJarAssets",
"(",
")",
"{",
"if",
"(",
"jarAssets",
"==",
"null",
")",
"{",
"jarAssets",
"=",
"getAssets",
"(",
"Asset",
".",
"JAR",
")",
";",
"}",
"return",
"jarAssets",
";",
"}"
] | This is used by CloudClassLoader to search all JAR file assets | [
"This",
"is",
"used",
"by",
"CloudClassLoader",
"to",
"search",
"all",
"JAR",
"file",
"assets"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cache/impl/AssetCache.java#L453-L458 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceNotifierFactory.java | TaskInstanceNotifierFactory.getNotifierSpecs | public List<String> getNotifierSpecs(Long taskId, String outcome) throws ObserverException {
TaskTemplate taskVO = TaskTemplateCache.getTaskTemplate(taskId);
if (taskVO != null) {
String noticesAttr = taskVO.getAttribute(TaskAttributeConstant.NOTICES);
if (!StringHelper.isEmpty(n... | java | public List<String> getNotifierSpecs(Long taskId, String outcome) throws ObserverException {
TaskTemplate taskVO = TaskTemplateCache.getTaskTemplate(taskId);
if (taskVO != null) {
String noticesAttr = taskVO.getAttribute(TaskAttributeConstant.NOTICES);
if (!StringHelper.isEmpty(n... | [
"public",
"List",
"<",
"String",
">",
"getNotifierSpecs",
"(",
"Long",
"taskId",
",",
"String",
"outcome",
")",
"throws",
"ObserverException",
"{",
"TaskTemplate",
"taskVO",
"=",
"TaskTemplateCache",
".",
"getTaskTemplate",
"(",
"taskId",
")",
";",
"if",
"(",
... | Returns a list of notifier class name and template name pairs, delimited by colon
@param taskId
@param outcome
@return the registered notifier or null if not found | [
"Returns",
"a",
"list",
"of",
"notifier",
"class",
"name",
"and",
"template",
"name",
"pairs",
"delimited",
"by",
"colon"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceNotifierFactory.java#L59-L68 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceNotifierFactory.java | TaskInstanceNotifierFactory.getNotifierSpecs | public List<String> getNotifierSpecs(Long taskId, Long processInstanceId, String outcome) throws ObserverException {
String noticesAttr = null;
EventServices eventManager = ServiceLocator.getEventServices();
try {
if (processInstanceId != null) {
Process process = eve... | java | public List<String> getNotifierSpecs(Long taskId, Long processInstanceId, String outcome) throws ObserverException {
String noticesAttr = null;
EventServices eventManager = ServiceLocator.getEventServices();
try {
if (processInstanceId != null) {
Process process = eve... | [
"public",
"List",
"<",
"String",
">",
"getNotifierSpecs",
"(",
"Long",
"taskId",
",",
"Long",
"processInstanceId",
",",
"String",
"outcome",
")",
"throws",
"ObserverException",
"{",
"String",
"noticesAttr",
"=",
"null",
";",
"EventServices",
"eventManager",
"=",
... | Return a list of notifier class name and template name and version pairs
Get the template name and notifier class names based on the process activity attributes to get the relevant values for in flight and new processes
@param taskId
@param processInstanceId
@param outcome
@return
@throws ObserverException | [
"Return",
"a",
"list",
"of",
"notifier",
"class",
"name",
"and",
"template",
"name",
"and",
"version",
"pairs",
"Get",
"the",
"template",
"name",
"and",
"notifier",
"class",
"names",
"based",
"on",
"the",
"process",
"activity",
"attributes",
"to",
"get",
"th... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceNotifierFactory.java#L78-L102 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceNotifierFactory.java | TaskInstanceNotifierFactory.parseNoticiesAttr | private List<String> parseNoticiesAttr(String noticesAttr, String outcome) {
List<String> notifiers = new ArrayList<String>();
int columnCount = 4;
int colon = noticesAttr.indexOf(";");
if (colon != -1) {
columnCount = StringHelper.delimiterColumnCount(noticesAttr.substring(0... | java | private List<String> parseNoticiesAttr(String noticesAttr, String outcome) {
List<String> notifiers = new ArrayList<String>();
int columnCount = 4;
int colon = noticesAttr.indexOf(";");
if (colon != -1) {
columnCount = StringHelper.delimiterColumnCount(noticesAttr.substring(0... | [
"private",
"List",
"<",
"String",
">",
"parseNoticiesAttr",
"(",
"String",
"noticesAttr",
",",
"String",
"outcome",
")",
"{",
"List",
"<",
"String",
">",
"notifiers",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"int",
"columnCount",
"=",
... | To parse notices attribute
@param noticesAttr
@return | [
"To",
"parse",
"notices",
"attribute"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceNotifierFactory.java#L109-L135 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/xml/XmlBeanAssert.java | XmlBeanAssert.assertEquals | public static void assertEquals(String message, XmlCursor expected, XmlCursor actual)
{
for (int child = 0; true; child++)
{
boolean child1 = expected.toChild(child);
boolean child2 = actual.toChild(child);
if (child1 != child2)
{
fail(message, "Different XML structure near " +... | java | public static void assertEquals(String message, XmlCursor expected, XmlCursor actual)
{
for (int child = 0; true; child++)
{
boolean child1 = expected.toChild(child);
boolean child2 = actual.toChild(child);
if (child1 != child2)
{
fail(message, "Different XML structure near " +... | [
"public",
"static",
"void",
"assertEquals",
"(",
"String",
"message",
",",
"XmlCursor",
"expected",
",",
"XmlCursor",
"actual",
")",
"{",
"for",
"(",
"int",
"child",
"=",
"0",
";",
"true",
";",
"child",
"++",
")",
"{",
"boolean",
"child1",
"=",
"expected... | Uses cursors to compare two XML documents, ignoring whitespace and
ordering of attributes. Fails the JUnit test if they're different.
@param message to display on test failure (may be null)
@param expected
@param actual | [
"Uses",
"cursors",
"to",
"compare",
"two",
"XML",
"documents",
"ignoring",
"whitespace",
"and",
"ordering",
"of",
"attributes",
".",
"Fails",
"the",
"JUnit",
"test",
"if",
"they",
"re",
"different",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/xml/XmlBeanAssert.java#L80-L117 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/xml/XmlBeanAssert.java | XmlBeanAssert.assertAttributesEqual | private static void assertAttributesEqual(String message, XmlCursor expected, XmlCursor actual)
{
Map<QName,String> map1 = new HashMap<QName,String>();
Map<QName,String> map2 = new HashMap<QName,String>();
boolean attr1 = expected.toFirstAttribute();
boolean attr2 = actual.toFirstAttribute();
if ... | java | private static void assertAttributesEqual(String message, XmlCursor expected, XmlCursor actual)
{
Map<QName,String> map1 = new HashMap<QName,String>();
Map<QName,String> map2 = new HashMap<QName,String>();
boolean attr1 = expected.toFirstAttribute();
boolean attr2 = actual.toFirstAttribute();
if ... | [
"private",
"static",
"void",
"assertAttributesEqual",
"(",
"String",
"message",
",",
"XmlCursor",
"expected",
",",
"XmlCursor",
"actual",
")",
"{",
"Map",
"<",
"QName",
",",
"String",
">",
"map1",
"=",
"new",
"HashMap",
"<",
"QName",
",",
"String",
">",
"(... | Compares the attributes of the elements at the current position of two XmlCursors.
The ordering of the attributes is ignored in the comparison. Fails the JUnit test
case if the attributes or their values are different.
@param message to display on test failure (may be null)
@param expected
@param actual | [
"Compares",
"the",
"attributes",
"of",
"the",
"elements",
"at",
"the",
"current",
"position",
"of",
"two",
"XmlCursors",
".",
"The",
"ordering",
"of",
"the",
"attributes",
"is",
"ignored",
"in",
"the",
"comparison",
".",
"Fails",
"the",
"JUnit",
"test",
"cas... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/xml/XmlBeanAssert.java#L128-L196 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/config/JavaPropertyManager.java | JavaPropertyManager.getMainPropertyFileName | private String getMainPropertyFileName() throws StartupException {
String configLoc = getConfigLocation();
File file = new File(configLoc == null ? MDW_PROPERTIES_FILE_NAME : (configLoc+MDW_PROPERTIES_FILE_NAME));
if (file.exists())
return MDW_PROPERTIES_FILE_NAME;
URL url = ... | java | private String getMainPropertyFileName() throws StartupException {
String configLoc = getConfigLocation();
File file = new File(configLoc == null ? MDW_PROPERTIES_FILE_NAME : (configLoc+MDW_PROPERTIES_FILE_NAME));
if (file.exists())
return MDW_PROPERTIES_FILE_NAME;
URL url = ... | [
"private",
"String",
"getMainPropertyFileName",
"(",
")",
"throws",
"StartupException",
"{",
"String",
"configLoc",
"=",
"getConfigLocation",
"(",
")",
";",
"File",
"file",
"=",
"new",
"File",
"(",
"configLoc",
"==",
"null",
"?",
"MDW_PROPERTIES_FILE_NAME",
":",
... | Null means not found. | [
"Null",
"means",
"not",
"found",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/config/JavaPropertyManager.java#L89-L98 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/node/WebpackCache.java | WebpackCache.getCompiled | public File getCompiled(AssetInfo asset, File starter) throws IOException, ServiceException {
File file;
synchronized(WebpackCache.class) {
file = webpackAssets.get(asset);
if (file == null || !file.exists() || file.lastModified() < asset.getFile().lastModified()
... | java | public File getCompiled(AssetInfo asset, File starter) throws IOException, ServiceException {
File file;
synchronized(WebpackCache.class) {
file = webpackAssets.get(asset);
if (file == null || !file.exists() || file.lastModified() < asset.getFile().lastModified()
... | [
"public",
"File",
"getCompiled",
"(",
"AssetInfo",
"asset",
",",
"File",
"starter",
")",
"throws",
"IOException",
",",
"ServiceException",
"{",
"File",
"file",
";",
"synchronized",
"(",
"WebpackCache",
".",
"class",
")",
"{",
"file",
"=",
"webpackAssets",
".",... | Starter file will be compiled, but asset used to compute output path. | [
"Starter",
"file",
"will",
"be",
"compiled",
"but",
"asset",
"used",
"to",
"compute",
"output",
"path",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/node/WebpackCache.java#L144-L156 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/node/WebpackCache.java | WebpackCache.compile | private void compile(AssetInfo asset, File source, File target) throws ServiceException {
File watched = watchedAssets.get(asset);
if (watched == null) {
if (isDevMode()) {
new Thread(() -> {
try {
// avoid recursive compiles
... | java | private void compile(AssetInfo asset, File source, File target) throws ServiceException {
File watched = watchedAssets.get(asset);
if (watched == null) {
if (isDevMode()) {
new Thread(() -> {
try {
// avoid recursive compiles
... | [
"private",
"void",
"compile",
"(",
"AssetInfo",
"asset",
",",
"File",
"source",
",",
"File",
"target",
")",
"throws",
"ServiceException",
"{",
"File",
"watched",
"=",
"watchedAssets",
".",
"get",
"(",
"asset",
")",
";",
"if",
"(",
"watched",
"==",
"null",
... | Returns null except in dev mode. | [
"Returns",
"null",
"except",
"in",
"dev",
"mode",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/node/WebpackCache.java#L205-L225 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/monitor/MonitorRegistry.java | MonitorRegistry.getServiceMonitors | public List<ServiceMonitor> getServiceMonitors() {
List<ServiceMonitor> serviceMonitors = new ArrayList<>();
serviceMonitors.addAll(getDynamicServices(ServiceMonitor.class));
return serviceMonitors;
} | java | public List<ServiceMonitor> getServiceMonitors() {
List<ServiceMonitor> serviceMonitors = new ArrayList<>();
serviceMonitors.addAll(getDynamicServices(ServiceMonitor.class));
return serviceMonitors;
} | [
"public",
"List",
"<",
"ServiceMonitor",
">",
"getServiceMonitors",
"(",
")",
"{",
"List",
"<",
"ServiceMonitor",
">",
"serviceMonitors",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"serviceMonitors",
".",
"addAll",
"(",
"getDynamicServices",
"(",
"ServiceMoni... | Returns all service monitors. | [
"Returns",
"all",
"service",
"monitors",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/monitor/MonitorRegistry.java#L115-L119 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/activity/task/ManualTaskActivity.java | ManualTaskActivity.createTaskInstance | protected TaskInstance createTaskInstance() throws ActivityException {
try {
String taskTemplate = getAttributeValue(ATTRIBUTE_TASK_TEMPLATE);
if (taskTemplate == null)
throw new ActivityException("Missing attribute: " + ATTRIBUTE_TASK_TEMPLATE);
String templa... | java | protected TaskInstance createTaskInstance() throws ActivityException {
try {
String taskTemplate = getAttributeValue(ATTRIBUTE_TASK_TEMPLATE);
if (taskTemplate == null)
throw new ActivityException("Missing attribute: " + ATTRIBUTE_TASK_TEMPLATE);
String templa... | [
"protected",
"TaskInstance",
"createTaskInstance",
"(",
")",
"throws",
"ActivityException",
"{",
"try",
"{",
"String",
"taskTemplate",
"=",
"getAttributeValue",
"(",
"ATTRIBUTE_TASK_TEMPLATE",
")",
";",
"if",
"(",
"taskTemplate",
"==",
"null",
")",
"throw",
"new",
... | Creates a new task instance based on the configured template for this activity. | [
"Creates",
"a",
"new",
"task",
"instance",
"based",
"on",
"the",
"configured",
"template",
"for",
"this",
"activity",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/task/ManualTaskActivity.java#L43-L78 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/microservice/MicroserviceRestAdapter.java | MicroserviceRestAdapter.getRequestHeaders | @Override
public Map<String, String> getRequestHeaders() {
Map<String, String> requestHeaders = super.getRequestHeaders();
if (requestHeaders == null)
requestHeaders = new HashMap<>();
try {
requestHeaders.put(Request.REQUEST_ID, getMasterRequestId());
Str... | java | @Override
public Map<String, String> getRequestHeaders() {
Map<String, String> requestHeaders = super.getRequestHeaders();
if (requestHeaders == null)
requestHeaders = new HashMap<>();
try {
requestHeaders.put(Request.REQUEST_ID, getMasterRequestId());
Str... | [
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getRequestHeaders",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"requestHeaders",
"=",
"super",
".",
"getRequestHeaders",
"(",
")",
";",
"if",
"(",
"requestHeaders",
"==",
... | Overridden to append JSON headers. | [
"Overridden",
"to",
"append",
"JSON",
"headers",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/microservice/MicroserviceRestAdapter.java#L34-L51 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/microservice/MicroserviceRestAdapter.java | MicroserviceRestAdapter.getRequestId | public Long getRequestId() throws ActivityException {
if (requestId != null)
return requestId;
String requestIdVarName = getAttribute("requestIdVariable", "requestId");
Variable requestIdVar = getProcessDefinition().getVariable(requestIdVarName);
if (requestIdVar == null &... | java | public Long getRequestId() throws ActivityException {
if (requestId != null)
return requestId;
String requestIdVarName = getAttribute("requestIdVariable", "requestId");
Variable requestIdVar = getProcessDefinition().getVariable(requestIdVarName);
if (requestIdVar == null &... | [
"public",
"Long",
"getRequestId",
"(",
")",
"throws",
"ActivityException",
"{",
"if",
"(",
"requestId",
"!=",
"null",
")",
"return",
"requestId",
";",
"String",
"requestIdVarName",
"=",
"getAttribute",
"(",
"\"requestIdVariable\"",
",",
"\"requestId\"",
")",
";",
... | Returns the requestId that we will use to populate the serviceSummary
@return requestId used to populate the serviceSummary | [
"Returns",
"the",
"requestId",
"that",
"we",
"will",
"use",
"to",
"populate",
"the",
"serviceSummary"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/microservice/MicroserviceRestAdapter.java#L215-L242 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/slack/TaskHandler.java | TaskHandler.handleEvent | @Override
public JSONObject handleEvent(SlackEvent event) throws ServiceException {
if (event.getCallbackId() != null && event.getCallbackId().indexOf('_') > 0 && event.getCallbackId().indexOf('/') > 0 && event.getTs() != null) {
Long instanceId = Long.parseLong(event.getCallbackId().substring(e... | java | @Override
public JSONObject handleEvent(SlackEvent event) throws ServiceException {
if (event.getCallbackId() != null && event.getCallbackId().indexOf('_') > 0 && event.getCallbackId().indexOf('/') > 0 && event.getTs() != null) {
Long instanceId = Long.parseLong(event.getCallbackId().substring(e... | [
"@",
"Override",
"public",
"JSONObject",
"handleEvent",
"(",
"SlackEvent",
"event",
")",
"throws",
"ServiceException",
"{",
"if",
"(",
"event",
".",
"getCallbackId",
"(",
")",
"!=",
"null",
"&&",
"event",
".",
"getCallbackId",
"(",
")",
".",
"indexOf",
"(",
... | Messages posted on the "tasks" channel. | [
"Messages",
"posted",
"on",
"the",
"tasks",
"channel",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/slack/TaskHandler.java#L148-L190 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/file/FileHelper.java | FileHelper.writeToFile | public static void writeToFile(String pFileName, String pContents, boolean pAppend)
throws IOException{
FileWriter writer = null;
writer = new FileWriter(pFileName, pAppend);
writer.write(pContents);
writer.flush();
writer.close();
} | java | public static void writeToFile(String pFileName, String pContents, boolean pAppend)
throws IOException{
FileWriter writer = null;
writer = new FileWriter(pFileName, pAppend);
writer.write(pContents);
writer.flush();
writer.close();
} | [
"public",
"static",
"void",
"writeToFile",
"(",
"String",
"pFileName",
",",
"String",
"pContents",
",",
"boolean",
"pAppend",
")",
"throws",
"IOException",
"{",
"FileWriter",
"writer",
"=",
"null",
";",
"writer",
"=",
"new",
"FileWriter",
"(",
"pFileName",
","... | Method that writes the file contents
@param pFileName
@param pContents
@param pAppend | [
"Method",
"that",
"writes",
"the",
"file",
"contents"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/file/FileHelper.java#L206-L214 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/file/FileHelper.java | FileHelper.openConfigurationFile | public static InputStream openConfigurationFile(String filepath, ClassLoader classLoader) throws FileNotFoundException {
File file = getConfigurationFile(filepath);
if (file.exists()) {
logger.info("Located configuration file: " + file.getAbsolutePath());
return new FileInputStre... | java | public static InputStream openConfigurationFile(String filepath, ClassLoader classLoader) throws FileNotFoundException {
File file = getConfigurationFile(filepath);
if (file.exists()) {
logger.info("Located configuration file: " + file.getAbsolutePath());
return new FileInputStre... | [
"public",
"static",
"InputStream",
"openConfigurationFile",
"(",
"String",
"filepath",
",",
"ClassLoader",
"classLoader",
")",
"throws",
"FileNotFoundException",
"{",
"File",
"file",
"=",
"getConfigurationFile",
"(",
"filepath",
")",
";",
"if",
"(",
"file",
".",
"... | Open configuration file. If Java system property mdw.config.location is defined,
and the file exists in that directory, it will load the file. Otherwise it loads through
the class path.
@param filepath
@param classLoader
@return Input steam of the file
@throws FileNotFoundException if the file is not found | [
"Open",
"configuration",
"file",
".",
"If",
"Java",
"system",
"property",
"mdw",
".",
"config",
".",
"location",
"is",
"defined",
"and",
"the",
"file",
"exists",
"in",
"that",
"directory",
"it",
"will",
"load",
"the",
"file",
".",
"Otherwise",
"it",
"loads... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/file/FileHelper.java#L325-L351 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/drools/RulesBasedStrategy.java | RulesBasedStrategy.getKnowledgeBase | protected KieBase getKnowledgeBase(String name, String modifier) throws StrategyException {
KnowledgeBaseAsset kbrs = DroolsKnowledgeBaseCache.getKnowledgeBaseAsset(name, modifier, null, getClassLoader());
if (kbrs == null) {
return null;
}
else {
return kbrs.get... | java | protected KieBase getKnowledgeBase(String name, String modifier) throws StrategyException {
KnowledgeBaseAsset kbrs = DroolsKnowledgeBaseCache.getKnowledgeBaseAsset(name, modifier, null, getClassLoader());
if (kbrs == null) {
return null;
}
else {
return kbrs.get... | [
"protected",
"KieBase",
"getKnowledgeBase",
"(",
"String",
"name",
",",
"String",
"modifier",
")",
"throws",
"StrategyException",
"{",
"KnowledgeBaseAsset",
"kbrs",
"=",
"DroolsKnowledgeBaseCache",
".",
"getKnowledgeBaseAsset",
"(",
"name",
",",
"modifier",
",",
"null... | Returns the latest version.
Modifier is sheet name.
Override to apply additional or non-standard attribute conditions.
@throws StrategyException | [
"Returns",
"the",
"latest",
"version",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/drools/RulesBasedStrategy.java#L54-L63 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/dataaccess/db/CommonDataAccess.java | CommonDataAccess.getAttributes1 | protected List<Attribute> getAttributes1(String ownerType, Long ownerId)
throws SQLException {
List<Attribute> attrs = getAttributes0(ownerType, ownerId);
if (attrs==null) return null;
ResultSet rs;
String query = "select RULE_SET_DETAILS from RULE_SET where RULE_SET_ID=?";
f... | java | protected List<Attribute> getAttributes1(String ownerType, Long ownerId)
throws SQLException {
List<Attribute> attrs = getAttributes0(ownerType, ownerId);
if (attrs==null) return null;
ResultSet rs;
String query = "select RULE_SET_DETAILS from RULE_SET where RULE_SET_ID=?";
f... | [
"protected",
"List",
"<",
"Attribute",
">",
"getAttributes1",
"(",
"String",
"ownerType",
",",
"Long",
"ownerId",
")",
"throws",
"SQLException",
"{",
"List",
"<",
"Attribute",
">",
"attrs",
"=",
"getAttributes0",
"(",
"ownerType",
",",
"ownerId",
")",
";",
"... | Same as getAttribute1 but handles overflow values
@param ownerType
@param ownerId
@return list of Attributes | [
"Same",
"as",
"getAttribute1",
"but",
"handles",
"overflow",
"values"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/dataaccess/db/CommonDataAccess.java#L219-L236 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/dataaccess/db/CommonDataAccess.java | CommonDataAccess.getDocument | public Document getDocument(Long documentId) throws DataAccessException {
try {
db.openConnection();
return this.getDocument(documentId, false);
} catch (SQLException ex) {
throw new DataAccessException("Failed to load document: " + documentId, ex);
} finally ... | java | public Document getDocument(Long documentId) throws DataAccessException {
try {
db.openConnection();
return this.getDocument(documentId, false);
} catch (SQLException ex) {
throw new DataAccessException("Failed to load document: " + documentId, ex);
} finally ... | [
"public",
"Document",
"getDocument",
"(",
"Long",
"documentId",
")",
"throws",
"DataAccessException",
"{",
"try",
"{",
"db",
".",
"openConnection",
"(",
")",
";",
"return",
"this",
".",
"getDocument",
"(",
"documentId",
",",
"false",
")",
";",
"}",
"catch",
... | Not for update. Opens a new connection. | [
"Not",
"for",
"update",
".",
"Opens",
"a",
"new",
"connection",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/dataaccess/db/CommonDataAccess.java#L409-L418 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/sync/SyncExpressionEvaluator.java | SyncExpressionEvaluator.evaluate | @SuppressWarnings("unchecked")
public boolean evaluate(List<String> completedActivities, List<VariableInstance> variableInstances)
throws SynchronizationException {
if (syncedActivityIds == null || syncedActivityIds.length == 0)
return true;
try {
Expression e = Expressi... | java | @SuppressWarnings("unchecked")
public boolean evaluate(List<String> completedActivities, List<VariableInstance> variableInstances)
throws SynchronizationException {
if (syncedActivityIds == null || syncedActivityIds.length == 0)
return true;
try {
Expression e = Expressi... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"boolean",
"evaluate",
"(",
"List",
"<",
"String",
">",
"completedActivities",
",",
"List",
"<",
"VariableInstance",
">",
"variableInstances",
")",
"throws",
"SynchronizationException",
"{",
"if",
"(",
... | Checks whether the synchronization criteria can be considered to be met
by evaluating the expression versus the list of completed activities.
@param completedActivities logical ids of completed activities
@param variableInstances variable instances to use in evaluation
@return result of the evaluation | [
"Checks",
"whether",
"the",
"synchronization",
"criteria",
"can",
"be",
"considered",
"to",
"be",
"met",
"by",
"evaluating",
"the",
"expression",
"versus",
"the",
"list",
"of",
"completed",
"activities",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/sync/SyncExpressionEvaluator.java#L68-L103 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/sync/SyncExpressionEvaluator.java | SyncExpressionEvaluator.getDefaultSyncExpression | public String getDefaultSyncExpression() {
String syncExpression = "";
for (int i = 0; i < syncedActivityIds.length; i++) {
if (i > 0)
syncExpression += " && ";
syncExpression += syncedActivityIds[i];
}
return syncExpression;
} | java | public String getDefaultSyncExpression() {
String syncExpression = "";
for (int i = 0; i < syncedActivityIds.length; i++) {
if (i > 0)
syncExpression += " && ";
syncExpression += syncedActivityIds[i];
}
return syncExpression;
} | [
"public",
"String",
"getDefaultSyncExpression",
"(",
")",
"{",
"String",
"syncExpression",
"=",
"\"\"",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"syncedActivityIds",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",... | Create the default sync expression based on the synced activity logical IDs.
@param syncedActivityNames
@return the default sync expression | [
"Create",
"the",
"default",
"sync",
"expression",
"based",
"on",
"the",
"synced",
"activity",
"logical",
"IDs",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/sync/SyncExpressionEvaluator.java#L110-L118 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java | TaskInstanceStrategyFactory.getRoutingStrategy | public static RoutingStrategy getRoutingStrategy(String attributeValue) throws StrategyException {
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStrategyClassName(attributeValue, StrategyType.RoutingStrategy);
RoutingStrategy strategy = (RoutingStrategy) fact... | java | public static RoutingStrategy getRoutingStrategy(String attributeValue) throws StrategyException {
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStrategyClassName(attributeValue, StrategyType.RoutingStrategy);
RoutingStrategy strategy = (RoutingStrategy) fact... | [
"public",
"static",
"RoutingStrategy",
"getRoutingStrategy",
"(",
"String",
"attributeValue",
")",
"throws",
"StrategyException",
"{",
"TaskInstanceStrategyFactory",
"factory",
"=",
"getInstance",
"(",
")",
";",
"String",
"className",
"=",
"factory",
".",
"getStrategyCl... | Returns a workgroup routing strategy instance based on an attribute value
which can consist of either the routing strategy logical name, or an xml document.
@param attributeValue
@return the routing strategy implementor instance | [
"Returns",
"a",
"workgroup",
"routing",
"strategy",
"instance",
"based",
"on",
"an",
"attribute",
"value",
"which",
"can",
"consist",
"of",
"either",
"the",
"routing",
"strategy",
"logical",
"name",
"or",
"an",
"xml",
"document",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java#L56-L61 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java | TaskInstanceStrategyFactory.getRoutingStrategy | public static RoutingStrategy getRoutingStrategy(String attributeValue, Long processInstanceId) throws StrategyException {
Package packageVO = processInstanceId == null ? null : getPackage(processInstanceId);
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStra... | java | public static RoutingStrategy getRoutingStrategy(String attributeValue, Long processInstanceId) throws StrategyException {
Package packageVO = processInstanceId == null ? null : getPackage(processInstanceId);
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStra... | [
"public",
"static",
"RoutingStrategy",
"getRoutingStrategy",
"(",
"String",
"attributeValue",
",",
"Long",
"processInstanceId",
")",
"throws",
"StrategyException",
"{",
"Package",
"packageVO",
"=",
"processInstanceId",
"==",
"null",
"?",
"null",
":",
"getPackage",
"("... | Returns a workgroup routing strategy instance based on an attribute value and bundle spec
which can consist of either the routing strategy logical name, or an xml document.
@param attributeValue
@param processInstanceId
@return
@throws StrategyException | [
"Returns",
"a",
"workgroup",
"routing",
"strategy",
"instance",
"based",
"on",
"an",
"attribute",
"value",
"and",
"bundle",
"spec",
"which",
"can",
"consist",
"of",
"either",
"the",
"routing",
"strategy",
"logical",
"name",
"or",
"an",
"xml",
"document",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java#L71-L77 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java | TaskInstanceStrategyFactory.getSubTaskStrategy | public static SubTaskStrategy getSubTaskStrategy(String attributeValue) throws StrategyException {
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStrategyClassName(attributeValue, StrategyType.SubTaskStrategy);
SubTaskStrategy strategy = (SubTaskStrategy) fact... | java | public static SubTaskStrategy getSubTaskStrategy(String attributeValue) throws StrategyException {
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStrategyClassName(attributeValue, StrategyType.SubTaskStrategy);
SubTaskStrategy strategy = (SubTaskStrategy) fact... | [
"public",
"static",
"SubTaskStrategy",
"getSubTaskStrategy",
"(",
"String",
"attributeValue",
")",
"throws",
"StrategyException",
"{",
"TaskInstanceStrategyFactory",
"factory",
"=",
"getInstance",
"(",
")",
";",
"String",
"className",
"=",
"factory",
".",
"getStrategyCl... | Returns a subtask strategy instance based on an attribute value
which can consist of either the subtask strategy logical name, or an xml document.
@param attributeValue
@return the subtask strategy implementor instance | [
"Returns",
"a",
"subtask",
"strategy",
"instance",
"based",
"on",
"an",
"attribute",
"value",
"which",
"can",
"consist",
"of",
"either",
"the",
"subtask",
"strategy",
"logical",
"name",
"or",
"an",
"xml",
"document",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java#L85-L90 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java | TaskInstanceStrategyFactory.getSubTaskStrategy | public static SubTaskStrategy getSubTaskStrategy(String attributeValue, Long processInstanceId) throws StrategyException {
Package packageVO = processInstanceId == null ? null : getPackage(processInstanceId);
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStra... | java | public static SubTaskStrategy getSubTaskStrategy(String attributeValue, Long processInstanceId) throws StrategyException {
Package packageVO = processInstanceId == null ? null : getPackage(processInstanceId);
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStra... | [
"public",
"static",
"SubTaskStrategy",
"getSubTaskStrategy",
"(",
"String",
"attributeValue",
",",
"Long",
"processInstanceId",
")",
"throws",
"StrategyException",
"{",
"Package",
"packageVO",
"=",
"processInstanceId",
"==",
"null",
"?",
"null",
":",
"getPackage",
"("... | Returns a subtask strategy instance based on an attribute value and bundle spec
which can consist of either the subtask strategy logical name, or an xml document.
@param attributeValue
@return the subtask strategy implementor instance | [
"Returns",
"a",
"subtask",
"strategy",
"instance",
"based",
"on",
"an",
"attribute",
"value",
"and",
"bundle",
"spec",
"which",
"can",
"consist",
"of",
"either",
"the",
"subtask",
"strategy",
"logical",
"name",
"or",
"an",
"xml",
"document",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java#L98-L104 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java | TaskInstanceStrategyFactory.getPrioritizationStrategy | public static PrioritizationStrategy getPrioritizationStrategy(String attributeValue) throws StrategyException {
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStrategyClassName(attributeValue, StrategyType.PrioritizationStrategy);
PrioritizationStrategy strat... | java | public static PrioritizationStrategy getPrioritizationStrategy(String attributeValue) throws StrategyException {
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStrategyClassName(attributeValue, StrategyType.PrioritizationStrategy);
PrioritizationStrategy strat... | [
"public",
"static",
"PrioritizationStrategy",
"getPrioritizationStrategy",
"(",
"String",
"attributeValue",
")",
"throws",
"StrategyException",
"{",
"TaskInstanceStrategyFactory",
"factory",
"=",
"getInstance",
"(",
")",
";",
"String",
"className",
"=",
"factory",
".",
... | Returns a Prioritization routing strategy instance based on an attribute value
which can consist of either the routing strategy logical name, or an xml document.
@param attributeValue
@return the Prioritization strategy implementor instance | [
"Returns",
"a",
"Prioritization",
"routing",
"strategy",
"instance",
"based",
"on",
"an",
"attribute",
"value",
"which",
"can",
"consist",
"of",
"either",
"the",
"routing",
"strategy",
"logical",
"name",
"or",
"an",
"xml",
"document",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java#L112-L117 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java | TaskInstanceStrategyFactory.getPrioritizationStrategy | public static PrioritizationStrategy getPrioritizationStrategy(String attributeValue, Long processInstanceId) throws StrategyException {
Package packageVO = processInstanceId == null ? null : getPackage(processInstanceId);
TaskInstanceStrategyFactory factory = getInstance();
String className = f... | java | public static PrioritizationStrategy getPrioritizationStrategy(String attributeValue, Long processInstanceId) throws StrategyException {
Package packageVO = processInstanceId == null ? null : getPackage(processInstanceId);
TaskInstanceStrategyFactory factory = getInstance();
String className = f... | [
"public",
"static",
"PrioritizationStrategy",
"getPrioritizationStrategy",
"(",
"String",
"attributeValue",
",",
"Long",
"processInstanceId",
")",
"throws",
"StrategyException",
"{",
"Package",
"packageVO",
"=",
"processInstanceId",
"==",
"null",
"?",
"null",
":",
"getP... | Returns a Prioritization routing strategy instance based on an attribute value and bundle spec
which can consist of either the routing strategy logical name, or an xml document.
@param attributeValue
@return the Prioritization strategy implementor instance | [
"Returns",
"a",
"Prioritization",
"routing",
"strategy",
"instance",
"based",
"on",
"an",
"attribute",
"value",
"and",
"bundle",
"spec",
"which",
"can",
"consist",
"of",
"either",
"the",
"routing",
"strategy",
"logical",
"name",
"or",
"an",
"xml",
"document",
... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java#L125-L131 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java | TaskInstanceStrategyFactory.getAutoAssignStrategy | public static AutoAssignStrategy getAutoAssignStrategy(String logicalName) throws StrategyException {
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStrategyClassName(logicalName, StrategyType.AutoAssignStrategy);
return (AutoAssignStrategy) factory.getStrateg... | java | public static AutoAssignStrategy getAutoAssignStrategy(String logicalName) throws StrategyException {
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getStrategyClassName(logicalName, StrategyType.AutoAssignStrategy);
return (AutoAssignStrategy) factory.getStrateg... | [
"public",
"static",
"AutoAssignStrategy",
"getAutoAssignStrategy",
"(",
"String",
"logicalName",
")",
"throws",
"StrategyException",
"{",
"TaskInstanceStrategyFactory",
"factory",
"=",
"getInstance",
"(",
")",
";",
"String",
"className",
"=",
"factory",
".",
"getStrateg... | Returns an auto-assign strategy instance based on the logical name.
@param logicalName
@return the strategy implementor instance | [
"Returns",
"an",
"auto",
"-",
"assign",
"strategy",
"instance",
"based",
"on",
"the",
"logical",
"name",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java#L138-L142 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java | TaskInstanceStrategyFactory.getAutoAssignStrategy | public static AutoAssignStrategy getAutoAssignStrategy(String logicalName, Long processInstanceId) throws StrategyException {
Package packageVO = processInstanceId == null ? null : getPackage(processInstanceId);
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getS... | java | public static AutoAssignStrategy getAutoAssignStrategy(String logicalName, Long processInstanceId) throws StrategyException {
Package packageVO = processInstanceId == null ? null : getPackage(processInstanceId);
TaskInstanceStrategyFactory factory = getInstance();
String className = factory.getS... | [
"public",
"static",
"AutoAssignStrategy",
"getAutoAssignStrategy",
"(",
"String",
"logicalName",
",",
"Long",
"processInstanceId",
")",
"throws",
"StrategyException",
"{",
"Package",
"packageVO",
"=",
"processInstanceId",
"==",
"null",
"?",
"null",
":",
"getPackage",
... | Returns an auto-assign strategy instance based on the logical name and bundle spec.
@param logicalName
@return the strategy implementor instance | [
"Returns",
"an",
"auto",
"-",
"assign",
"strategy",
"instance",
"based",
"on",
"the",
"logical",
"name",
"and",
"bundle",
"spec",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/task/factory/TaskInstanceStrategyFactory.java#L149-L154 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/java/MdwJavaFileManager.java | MdwJavaFileManager.getJavaFileForOutput | public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling)
throws IOException {
if (logger.isMdwDebugEnabled())
logger.mdwDebug("Loading Dynamic Java byte code from: " + (sibling == null ? null : sibling.toUri()));
try {
Jav... | java | public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling)
throws IOException {
if (logger.isMdwDebugEnabled())
logger.mdwDebug("Loading Dynamic Java byte code from: " + (sibling == null ? null : sibling.toUri()));
try {
Jav... | [
"public",
"JavaFileObject",
"getJavaFileForOutput",
"(",
"Location",
"location",
",",
"String",
"className",
",",
"Kind",
"kind",
",",
"FileObject",
"sibling",
")",
"throws",
"IOException",
"{",
"if",
"(",
"logger",
".",
"isMdwDebugEnabled",
"(",
")",
")",
"logg... | Create a new Java file object which will be used by the compiler to
store the generated byte code. Also add a reference to the object to the
cache so it can be accessed by other parts of the application. | [
"Create",
"a",
"new",
"Java",
"file",
"object",
"which",
"will",
"be",
"used",
"by",
"the",
"compiler",
"to",
"store",
"the",
"generated",
"byte",
"code",
".",
"Also",
"add",
"a",
"reference",
"to",
"the",
"object",
"to",
"the",
"cache",
"so",
"it",
"c... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/java/MdwJavaFileManager.java#L55-L68 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/microservice/ResponseCollector.java | ResponseCollector.getServiceSummary | protected ServiceSummary getServiceSummary() throws ActivityException {
ServiceSummary serviceSummary = (ServiceSummary)getVariableValue("serviceSummary");
if (serviceSummary == null)
throw new ActivityException("Missing variable: serviceSummary");
return serviceSummary;
} | java | protected ServiceSummary getServiceSummary() throws ActivityException {
ServiceSummary serviceSummary = (ServiceSummary)getVariableValue("serviceSummary");
if (serviceSummary == null)
throw new ActivityException("Missing variable: serviceSummary");
return serviceSummary;
} | [
"protected",
"ServiceSummary",
"getServiceSummary",
"(",
")",
"throws",
"ActivityException",
"{",
"ServiceSummary",
"serviceSummary",
"=",
"(",
"ServiceSummary",
")",
"getVariableValue",
"(",
"\"serviceSummary\"",
")",
";",
"if",
"(",
"serviceSummary",
"==",
"null",
"... | If you really must name the variable something other than 'serviceSummary',
you can override this method to retrieve its value. | [
"If",
"you",
"really",
"must",
"name",
"the",
"variable",
"something",
"other",
"than",
"serviceSummary",
"you",
"can",
"override",
"this",
"method",
"to",
"retrieve",
"its",
"value",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/microservice/ResponseCollector.java#L53-L58 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/db/JdbcSqlAdapter.java | JdbcSqlAdapter.openConnection | @Override
protected Object openConnection() throws ConnectionException {
try {
String dataSource = getDataSource();
if (dataSource == null)
throw new ConnectionException("Missing attribute: " + JDBC_DATASOURCE);
DatabaseAccess dbAccess = new DatabaseAcces... | java | @Override
protected Object openConnection() throws ConnectionException {
try {
String dataSource = getDataSource();
if (dataSource == null)
throw new ConnectionException("Missing attribute: " + JDBC_DATASOURCE);
DatabaseAccess dbAccess = new DatabaseAcces... | [
"@",
"Override",
"protected",
"Object",
"openConnection",
"(",
")",
"throws",
"ConnectionException",
"{",
"try",
"{",
"String",
"dataSource",
"=",
"getDataSource",
"(",
")",
";",
"if",
"(",
"dataSource",
"==",
"null",
")",
"throw",
"new",
"ConnectionException",
... | Returns a db connection based on the configured jdbc url or datasource, which
includes the resource path. Override for HTTPS or other connection type. | [
"Returns",
"a",
"db",
"connection",
"based",
"on",
"the",
"configured",
"jdbc",
"url",
"or",
"datasource",
"which",
"includes",
"the",
"resource",
"path",
".",
"Override",
"for",
"HTTPS",
"or",
"other",
"connection",
"type",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/db/JdbcSqlAdapter.java#L52-L66 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/db/JdbcSqlAdapter.java | JdbcSqlAdapter.invoke | public Object invoke(Object conn, Object requestData) throws AdapterException {
try {
DatabaseAccess dbAccess = (DatabaseAccess)conn;
if (requestData == null)
throw new AdapterException("Missing SQL Query");
String query = (String) requestData;
Que... | java | public Object invoke(Object conn, Object requestData) throws AdapterException {
try {
DatabaseAccess dbAccess = (DatabaseAccess)conn;
if (requestData == null)
throw new AdapterException("Missing SQL Query");
String query = (String) requestData;
Que... | [
"public",
"Object",
"invoke",
"(",
"Object",
"conn",
",",
"Object",
"requestData",
")",
"throws",
"AdapterException",
"{",
"try",
"{",
"DatabaseAccess",
"dbAccess",
"=",
"(",
"DatabaseAccess",
")",
"conn",
";",
"if",
"(",
"requestData",
"==",
"null",
")",
"t... | Invokes the JDBC Query.
If QueryType is Select, returns a java.sql.ResultSet.
If QueryType is Update, returns an Integer with the number of rows updated. | [
"Invokes",
"the",
"JDBC",
"Query",
".",
"If",
"QueryType",
"is",
"Select",
"returns",
"a",
"java",
".",
"sql",
".",
"ResultSet",
".",
"If",
"QueryType",
"is",
"Update",
"returns",
"an",
"Integer",
"with",
"the",
"number",
"of",
"rows",
"updated",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/db/JdbcSqlAdapter.java#L93-L134 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/db/JdbcSqlAdapter.java | JdbcSqlAdapter.getRequestData | @Override
protected Object getRequestData() throws ActivityException {
try {
return executePreScript(getSqlQuery());
}
catch (Exception ex) {
throw new ActivityException(ex.getMessage(), ex);
}
} | java | @Override
protected Object getRequestData() throws ActivityException {
try {
return executePreScript(getSqlQuery());
}
catch (Exception ex) {
throw new ActivityException(ex.getMessage(), ex);
}
} | [
"@",
"Override",
"protected",
"Object",
"getRequestData",
"(",
")",
"throws",
"ActivityException",
"{",
"try",
"{",
"return",
"executePreScript",
"(",
"getSqlQuery",
"(",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"ex",
")",
"{",
"throw",
"new",
"Activit... | Returns the parameterized SQL query to execute. | [
"Returns",
"the",
"parameterized",
"SQL",
"query",
"to",
"execute",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/db/JdbcSqlAdapter.java#L177-L185 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/camel/CxfProcessLaunchHandler.java | CxfProcessLaunchHandler.getMasterRequestId | @SuppressWarnings("unchecked")
@Override
public String getMasterRequestId(Message request) {
List<SoapHeader> headers = (List<SoapHeader>) ((CxfPayload<?>)request.getBody()).getHeaders();
for (SoapHeader header : headers) {
if (header.getName().getLocalPart().equals("MasterRequestID"... | java | @SuppressWarnings("unchecked")
@Override
public String getMasterRequestId(Message request) {
List<SoapHeader> headers = (List<SoapHeader>) ((CxfPayload<?>)request.getBody()).getHeaders();
for (SoapHeader header : headers) {
if (header.getName().getLocalPart().equals("MasterRequestID"... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"@",
"Override",
"public",
"String",
"getMasterRequestId",
"(",
"Message",
"request",
")",
"{",
"List",
"<",
"SoapHeader",
">",
"headers",
"=",
"(",
"List",
"<",
"SoapHeader",
">",
")",
"(",
"(",
"CxfPayloa... | Assumes a 'MasterRequestID' SOAP header element. Override for something different. | [
"Assumes",
"a",
"MasterRequestID",
"SOAP",
"header",
"element",
".",
"Override",
"for",
"something",
"different",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/camel/CxfProcessLaunchHandler.java#L31-L42 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/bpmn/BpmnExportHelper.java | BpmnExportHelper.validate | private boolean validate(DefinitionsDocument defdoc) {
List<XmlError> errorList = new ArrayList<>();
XmlOptions options = new XmlOptions().setSavePrettyPrint().setSavePrettyPrintIndent(2)
.setSaveAggressiveNamespaces();
options.setErrorListener(errorList);
System.out.pri... | java | private boolean validate(DefinitionsDocument defdoc) {
List<XmlError> errorList = new ArrayList<>();
XmlOptions options = new XmlOptions().setSavePrettyPrint().setSavePrettyPrintIndent(2)
.setSaveAggressiveNamespaces();
options.setErrorListener(errorList);
System.out.pri... | [
"private",
"boolean",
"validate",
"(",
"DefinitionsDocument",
"defdoc",
")",
"{",
"List",
"<",
"XmlError",
">",
"errorList",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"XmlOptions",
"options",
"=",
"new",
"XmlOptions",
"(",
")",
".",
"setSavePrettyPrint",
... | Validates the xml after creation
@param defdoc
@return boolean valid? | [
"Validates",
"the",
"xml",
"after",
"creation"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/bpmn/BpmnExportHelper.java#L150-L171 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java | ApplicationContext.verifyClass | public static boolean verifyClass(String className){
try {
Class<?> cl = Class.forName(className);
cl.newInstance();
return true;
}
catch (Exception ex) {
logger.severeException("ApplicationContext: verifyClass(): General Exception occurred: " + ex.g... | java | public static boolean verifyClass(String className){
try {
Class<?> cl = Class.forName(className);
cl.newInstance();
return true;
}
catch (Exception ex) {
logger.severeException("ApplicationContext: verifyClass(): General Exception occurred: " + ex.g... | [
"public",
"static",
"boolean",
"verifyClass",
"(",
"String",
"className",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"cl",
"=",
"Class",
".",
"forName",
"(",
"className",
")",
";",
"cl",
".",
"newInstance",
"(",
")",
";",
"return",
"true",
";",
"}... | Verifies a class
@param className
@return boolean status | [
"Verifies",
"a",
"class"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java#L196-L206 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java | ApplicationContext.getAppId | public static String getAppId() {
if (appId != null)
return appId;
appId = PropertyManager.getProperty(PropertyNames.MDW_APP_ID);
if (appId == null) // try legacy property
appId = PropertyManager.getProperty("mdw.application.name");
if (appId == null)
... | java | public static String getAppId() {
if (appId != null)
return appId;
appId = PropertyManager.getProperty(PropertyNames.MDW_APP_ID);
if (appId == null) // try legacy property
appId = PropertyManager.getProperty("mdw.application.name");
if (appId == null)
... | [
"public",
"static",
"String",
"getAppId",
"(",
")",
"{",
"if",
"(",
"appId",
"!=",
"null",
")",
"return",
"appId",
";",
"appId",
"=",
"PropertyManager",
".",
"getProperty",
"(",
"PropertyNames",
".",
"MDW_APP_ID",
")",
";",
"if",
"(",
"appId",
"==",
"nul... | Returns the application name | [
"Returns",
"the",
"application",
"name"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java#L211-L220 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java | ApplicationContext.getAppVersion | public static String getAppVersion() {
if (appVersion != null)
return appVersion;
String appName = getAppId();
if ("mdw".equalsIgnoreCase(appName)) {
appVersion = getMdwVersion();
}
else {
appVersion = "Unknown";
try {
... | java | public static String getAppVersion() {
if (appVersion != null)
return appVersion;
String appName = getAppId();
if ("mdw".equalsIgnoreCase(appName)) {
appVersion = getMdwVersion();
}
else {
appVersion = "Unknown";
try {
... | [
"public",
"static",
"String",
"getAppVersion",
"(",
")",
"{",
"if",
"(",
"appVersion",
"!=",
"null",
")",
"return",
"appVersion",
";",
"String",
"appName",
"=",
"getAppId",
"(",
")",
";",
"if",
"(",
"\"mdw\"",
".",
"equalsIgnoreCase",
"(",
"appName",
")",
... | Returns the application version read from the build version file | [
"Returns",
"the",
"application",
"version",
"read",
"from",
"the",
"build",
"version",
"file"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java#L271-L298 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java | ApplicationContext.getServicesUrl | public static String getServicesUrl() {
String servicesUrl = PropertyManager.getProperty(PropertyNames.MDW_SERVICES_URL);
if (servicesUrl == null) {
servicesUrl = getMdwHubUrl();
}
if (servicesUrl.endsWith("/"))
servicesUrl = servicesUrl.substring(0, servicesUrl.l... | java | public static String getServicesUrl() {
String servicesUrl = PropertyManager.getProperty(PropertyNames.MDW_SERVICES_URL);
if (servicesUrl == null) {
servicesUrl = getMdwHubUrl();
}
if (servicesUrl.endsWith("/"))
servicesUrl = servicesUrl.substring(0, servicesUrl.l... | [
"public",
"static",
"String",
"getServicesUrl",
"(",
")",
"{",
"String",
"servicesUrl",
"=",
"PropertyManager",
".",
"getProperty",
"(",
"PropertyNames",
".",
"MDW_SERVICES_URL",
")",
";",
"if",
"(",
"servicesUrl",
"==",
"null",
")",
"{",
"servicesUrl",
"=",
"... | Returns the web services URL | [
"Returns",
"the",
"web",
"services",
"URL"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java#L393-L401 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java | ApplicationContext.getCentralServicesUrl | public static String getCentralServicesUrl() {
String centralServicesUrl = getMdwCentralUrl();
if (centralServicesUrl != null && centralServicesUrl.endsWith("/central"))
centralServicesUrl = centralServicesUrl.substring(0, centralServicesUrl.length() - 8);
return centralServicesUrl;
... | java | public static String getCentralServicesUrl() {
String centralServicesUrl = getMdwCentralUrl();
if (centralServicesUrl != null && centralServicesUrl.endsWith("/central"))
centralServicesUrl = centralServicesUrl.substring(0, centralServicesUrl.length() - 8);
return centralServicesUrl;
... | [
"public",
"static",
"String",
"getCentralServicesUrl",
"(",
")",
"{",
"String",
"centralServicesUrl",
"=",
"getMdwCentralUrl",
"(",
")",
";",
"if",
"(",
"centralServicesUrl",
"!=",
"null",
"&&",
"centralServicesUrl",
".",
"endsWith",
"(",
"\"/central\"",
")",
")",... | Compatibility for disparities in mdw-central hosting mechanism. | [
"Compatibility",
"for",
"disparities",
"in",
"mdw",
"-",
"central",
"hosting",
"mechanism",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/ApplicationContext.java#L690-L695 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/dataaccess/DbAccess.java | DbAccess.substitute | public static String substitute(String sql, Object... params) {
try {
if (params == null || params.length == 0)
return sql;
String subst = sql;
int start = 0;
int q;
for (int i = 0; start < subst.length() && (q = subst.indexOf('?', star... | java | public static String substitute(String sql, Object... params) {
try {
if (params == null || params.length == 0)
return sql;
String subst = sql;
int start = 0;
int q;
for (int i = 0; start < subst.length() && (q = subst.indexOf('?', star... | [
"public",
"static",
"String",
"substitute",
"(",
"String",
"sql",
",",
"Object",
"...",
"params",
")",
"{",
"try",
"{",
"if",
"(",
"params",
"==",
"null",
"||",
"params",
".",
"length",
"==",
"0",
")",
"return",
"sql",
";",
"String",
"subst",
"=",
"s... | Utility method for showing parameterized query result | [
"Utility",
"method",
"for",
"showing",
"parameterized",
"query",
"result"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/dataaccess/DbAccess.java#L67-L88 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/event/EventHandlerCache.java | EventHandlerCache.getPathExternalEvents | public static List<ExternalEvent> getPathExternalEvents(String bucket){
if (myPathCache.get(bucket) != null)
return myPathCache.get(bucket);
else if (bucket.indexOf('/') > 0) { // We could have a sub-path
return getPathExternalEvents(bucket.substring(0, bucket.lastIndexOf('/')))... | java | public static List<ExternalEvent> getPathExternalEvents(String bucket){
if (myPathCache.get(bucket) != null)
return myPathCache.get(bucket);
else if (bucket.indexOf('/') > 0) { // We could have a sub-path
return getPathExternalEvents(bucket.substring(0, bucket.lastIndexOf('/')))... | [
"public",
"static",
"List",
"<",
"ExternalEvent",
">",
"getPathExternalEvents",
"(",
"String",
"bucket",
")",
"{",
"if",
"(",
"myPathCache",
".",
"get",
"(",
"bucket",
")",
"!=",
"null",
")",
"return",
"myPathCache",
".",
"get",
"(",
"bucket",
")",
";",
... | returns the cached path-based external event
@param bucket
@return Cached Item | [
"returns",
"the",
"cached",
"path",
"-",
"based",
"external",
"event"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/event/EventHandlerCache.java#L78-L85 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/Rules.java | Rules.get | @Override
public JSONObject get(String path, Map<String,String> headers)
throws ServiceException, JSONException {
Asset rules = getRulesAsset(path);
Operand input = new Operand();
input.setContext(getContext(path));
Query query = getQuery(path, headers);
input.se... | java | @Override
public JSONObject get(String path, Map<String,String> headers)
throws ServiceException, JSONException {
Asset rules = getRulesAsset(path);
Operand input = new Operand();
input.setContext(getContext(path));
Query query = getQuery(path, headers);
input.se... | [
"@",
"Override",
"public",
"JSONObject",
"get",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"throws",
"ServiceException",
",",
"JSONException",
"{",
"Asset",
"rules",
"=",
"getRulesAsset",
"(",
"path",
")",
";",
"O... | Apply rules designated in asset path against incoming request parameters. | [
"Apply",
"rules",
"designated",
"in",
"asset",
"path",
"against",
"incoming",
"request",
"parameters",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Rules.java#L66-L87 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/Rules.java | Rules.post | @Override
@Path("/{assetPath}")
@ApiOperation(value="Apply rules identified by assetPath.", notes="Query may contain runtime values")
@ApiImplicitParams({
@ApiImplicitParam(name="FactsObject", paramType="body", required=true, value="Input to apply rules against"),
@ApiImplicitParam(name="ass... | java | @Override
@Path("/{assetPath}")
@ApiOperation(value="Apply rules identified by assetPath.", notes="Query may contain runtime values")
@ApiImplicitParams({
@ApiImplicitParam(name="FactsObject", paramType="body", required=true, value="Input to apply rules against"),
@ApiImplicitParam(name="ass... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{assetPath}\"",
")",
"@",
"ApiOperation",
"(",
"value",
"=",
"\"Apply rules identified by assetPath.\"",
",",
"notes",
"=",
"\"Query may contain runtime values\"",
")",
"@",
"ApiImplicitParams",
"(",
"{",
"@",
"ApiImplicitParam",
... | Apply rules designated in asset path against incoming JSONObject. | [
"Apply",
"rules",
"designated",
"in",
"asset",
"path",
"against",
"incoming",
"JSONObject",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Rules.java#L92-L120 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/activity/script/ScriptExecutorActivity.java | ScriptExecutorActivity.execute | public void execute() throws ActivityException {
try {
String language = getLanguage();
String script = getScript();
Object retObj = executeScript(script, language, null, null);
if (retObj != null)
setReturnCode(retObj.toString());
}
... | java | public void execute() throws ActivityException {
try {
String language = getLanguage();
String script = getScript();
Object retObj = executeScript(script, language, null, null);
if (retObj != null)
setReturnCode(retObj.toString());
}
... | [
"public",
"void",
"execute",
"(",
")",
"throws",
"ActivityException",
"{",
"try",
"{",
"String",
"language",
"=",
"getLanguage",
"(",
")",
";",
"String",
"script",
"=",
"getScript",
"(",
")",
";",
"Object",
"retObj",
"=",
"executeScript",
"(",
"script",
",... | Execute scripts in supported languages. | [
"Execute",
"scripts",
"in",
"supported",
"languages",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/script/ScriptExecutorActivity.java#L41-L58 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/dataaccess/reports/AggregateDataAccess.java | AggregateDataAccess.getEndDate | @SuppressWarnings("deprecation")
protected Date getEndDate(Query query) {
Instant instant = query.getInstantFilter("Ending");
if (instant == null)
return null;
else {
Date end = new Date(Date.from(instant).getTime() + DatabaseAccess.getDbTimeDiff());
if (e... | java | @SuppressWarnings("deprecation")
protected Date getEndDate(Query query) {
Instant instant = query.getInstantFilter("Ending");
if (instant == null)
return null;
else {
Date end = new Date(Date.from(instant).getTime() + DatabaseAccess.getDbTimeDiff());
if (e... | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"protected",
"Date",
"getEndDate",
"(",
"Query",
"query",
")",
"{",
"Instant",
"instant",
"=",
"query",
".",
"getInstantFilter",
"(",
"\"Ending\"",
")",
";",
"if",
"(",
"instant",
"==",
"null",
")",
"retu... | This is not completion date. It's ending start date. | [
"This",
"is",
"not",
"completion",
"date",
".",
"It",
"s",
"ending",
"start",
"date",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/dataaccess/reports/AggregateDataAccess.java#L64-L76 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java | EngineDataAccessDB.removeEventWaitForActivityInstance | public void removeEventWaitForActivityInstance(Long activityInstanceId, String reason) throws SQLException {
String query = "delete from EVENT_WAIT_INSTANCE where EVENT_WAIT_INSTANCE_OWNER_ID=?";
db.runUpdate(query, activityInstanceId);
this.recordEventHistory("All Events", EventLog.SUBCAT_DEREG... | java | public void removeEventWaitForActivityInstance(Long activityInstanceId, String reason) throws SQLException {
String query = "delete from EVENT_WAIT_INSTANCE where EVENT_WAIT_INSTANCE_OWNER_ID=?";
db.runUpdate(query, activityInstanceId);
this.recordEventHistory("All Events", EventLog.SUBCAT_DEREG... | [
"public",
"void",
"removeEventWaitForActivityInstance",
"(",
"Long",
"activityInstanceId",
",",
"String",
"reason",
")",
"throws",
"SQLException",
"{",
"String",
"query",
"=",
"\"delete from EVENT_WAIT_INSTANCE where EVENT_WAIT_INSTANCE_OWNER_ID=?\"",
";",
"db",
".",
"runUpda... | remove other wait instances when an activity receives one event | [
"remove",
"other",
"wait",
"instances",
"when",
"an",
"activity",
"receives",
"one",
"event"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java#L621-L628 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java | EngineDataAccessDB.removeEventWait | private void removeEventWait(String eventName) throws SQLException {
String query = "delete from EVENT_WAIT_INSTANCE where EVENT_NAME=?";
db.runUpdate(query, eventName);
this.recordEventHistory(eventName, EventLog.SUBCAT_DEREGISTER,
"N/A", 0L, "Deregister all existing waiters");
... | java | private void removeEventWait(String eventName) throws SQLException {
String query = "delete from EVENT_WAIT_INSTANCE where EVENT_NAME=?";
db.runUpdate(query, eventName);
this.recordEventHistory(eventName, EventLog.SUBCAT_DEREGISTER,
"N/A", 0L, "Deregister all existing waiters");
... | [
"private",
"void",
"removeEventWait",
"(",
"String",
"eventName",
")",
"throws",
"SQLException",
"{",
"String",
"query",
"=",
"\"delete from EVENT_WAIT_INSTANCE where EVENT_NAME=?\"",
";",
"db",
".",
"runUpdate",
"(",
"query",
",",
"eventName",
")",
";",
"this",
"."... | remove existing waiters when a new waiter is registered for the same event
@param eventName
@throws SQLException | [
"remove",
"existing",
"waiters",
"when",
"a",
"new",
"waiter",
"is",
"registered",
"for",
"the",
"same",
"event"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java#L635-L640 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java | EngineDataAccessDB.getScheduledEventList | public List<ScheduledEvent> getScheduledEventList(Date cutofftime) throws SQLException {
StringBuffer query = new StringBuffer();
query.append("select EVENT_NAME,CREATE_DT,CONSUME_DT,AUXDATA,REFERENCE,COMMENTS ");
query.append("from EVENT_INSTANCE ");
query.append("where STATUS_CD in (")... | java | public List<ScheduledEvent> getScheduledEventList(Date cutofftime) throws SQLException {
StringBuffer query = new StringBuffer();
query.append("select EVENT_NAME,CREATE_DT,CONSUME_DT,AUXDATA,REFERENCE,COMMENTS ");
query.append("from EVENT_INSTANCE ");
query.append("where STATUS_CD in (")... | [
"public",
"List",
"<",
"ScheduledEvent",
">",
"getScheduledEventList",
"(",
"Date",
"cutofftime",
")",
"throws",
"SQLException",
"{",
"StringBuffer",
"query",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"query",
".",
"append",
"(",
"\"select EVENT_NAME,CREATE_DT,CONS... | Load all internal event and scheduled jobs before cutoff time.
If cutoff time is null, load only unscheduled events
@param cutofftime a date or null
@return
@throws SQLException | [
"Load",
"all",
"internal",
"event",
"and",
"scheduled",
"jobs",
"before",
"cutoff",
"time",
".",
"If",
"cutoff",
"time",
"is",
"null",
"load",
"only",
"unscheduled",
"events"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java#L1072-L1099 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java | EngineDataAccessDB.getUnscheduledEventList | public List<UnscheduledEvent> getUnscheduledEventList(Date cutoffTime, int maxRows) throws SQLException {
StringBuffer query = new StringBuffer();
query.append("select EVENT_NAME,CREATE_DT,AUXDATA,REFERENCE,COMMENTS ");
query.append("from EVENT_INSTANCE ");
query.append("where STATUS_CD ... | java | public List<UnscheduledEvent> getUnscheduledEventList(Date cutoffTime, int maxRows) throws SQLException {
StringBuffer query = new StringBuffer();
query.append("select EVENT_NAME,CREATE_DT,AUXDATA,REFERENCE,COMMENTS ");
query.append("from EVENT_INSTANCE ");
query.append("where STATUS_CD ... | [
"public",
"List",
"<",
"UnscheduledEvent",
">",
"getUnscheduledEventList",
"(",
"Date",
"cutoffTime",
",",
"int",
"maxRows",
")",
"throws",
"SQLException",
"{",
"StringBuffer",
"query",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"query",
".",
"append",
"(",
"\... | Load all internal events start at the specified age and scheduled jobs before cutoff time.
If cutoff time is null, load only unscheduled events
@param cutoffTime a date or null
@return
@throws SQLException | [
"Load",
"all",
"internal",
"events",
"start",
"at",
"the",
"specified",
"age",
"and",
"scheduled",
"jobs",
"before",
"cutoff",
"time",
".",
"If",
"cutoff",
"time",
"is",
"null",
"load",
"only",
"unscheduled",
"events"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java#L1108-L1133 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java | EngineDataAccessDB.getVariableNameForTaskInstance | public String getVariableNameForTaskInstance(Long taskInstId, String name) throws SQLException {
String query = "select v.VARIABLE_NAME " +
"from VARIABLE v, VARIABLE_MAPPING vm, TASK t, TASK_INSTANCE ti " +
"where ti.TASK_INSTANCE_ID = ?" +
" and ti.TASK_ID = t.TASK_ID" +... | java | public String getVariableNameForTaskInstance(Long taskInstId, String name) throws SQLException {
String query = "select v.VARIABLE_NAME " +
"from VARIABLE v, VARIABLE_MAPPING vm, TASK t, TASK_INSTANCE ti " +
"where ti.TASK_INSTANCE_ID = ?" +
" and ti.TASK_ID = t.TASK_ID" +... | [
"public",
"String",
"getVariableNameForTaskInstance",
"(",
"Long",
"taskInstId",
",",
"String",
"name",
")",
"throws",
"SQLException",
"{",
"String",
"query",
"=",
"\"select v.VARIABLE_NAME \"",
"+",
"\"from VARIABLE v, VARIABLE_MAPPING vm, TASK t, TASK_INSTANCE ti \"",
"+",
... | Get the variable name for a task instance with 'Referred as' name
@param taskInstId
@param name
@return
@throws SQLException | [
"Get",
"the",
"variable",
"name",
"for",
"a",
"task",
"instance",
"with",
"Referred",
"as",
"name"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/process/EngineDataAccessDB.java#L1169-L1187 | train |
CenturyLinkCloud/mdw | mdw-spring-boot/src/com/centurylink/mdw/boot/AutoConfig.java | AutoConfig.initializeLogging | private static void initializeLogging() {
try {
String mdwLogLevel = LoggerUtil.initializeLogging();
if (mdwLogLevel != null) {
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
loggerContext.getLogger("com.centurylink.mdw").... | java | private static void initializeLogging() {
try {
String mdwLogLevel = LoggerUtil.initializeLogging();
if (mdwLogLevel != null) {
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
loggerContext.getLogger("com.centurylink.mdw").... | [
"private",
"static",
"void",
"initializeLogging",
"(",
")",
"{",
"try",
"{",
"String",
"mdwLogLevel",
"=",
"LoggerUtil",
".",
"initializeLogging",
"(",
")",
";",
"if",
"(",
"mdwLogLevel",
"!=",
"null",
")",
"{",
"LoggerContext",
"loggerContext",
"=",
"(",
"L... | Make zero-config logback logging honor mdw.logging.level in mdw.yaml. | [
"Make",
"zero",
"-",
"config",
"logback",
"logging",
"honor",
"mdw",
".",
"logging",
".",
"level",
"in",
"mdw",
".",
"yaml",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-spring-boot/src/com/centurylink/mdw/boot/AutoConfig.java#L112-L123 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/common/service/AbstractRoutingStrategy.java | AbstractRoutingStrategy.getActiveWorkerInstances | protected synchronized List<String> getActiveWorkerInstances() {
List<String> localList = new ArrayList<String>();
int activeServerInterval = PropertyManager.getIntegerProperty(PropertyNames.MDW_ROUTING_ACTIVE_SERVER_INTERVAL, 15); // Represents how many seconds between checks
if (lastCheck =... | java | protected synchronized List<String> getActiveWorkerInstances() {
List<String> localList = new ArrayList<String>();
int activeServerInterval = PropertyManager.getIntegerProperty(PropertyNames.MDW_ROUTING_ACTIVE_SERVER_INTERVAL, 15); // Represents how many seconds between checks
if (lastCheck =... | [
"protected",
"synchronized",
"List",
"<",
"String",
">",
"getActiveWorkerInstances",
"(",
")",
"{",
"List",
"<",
"String",
">",
"localList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"int",
"activeServerInterval",
"=",
"PropertyManager",
".",... | Override this to modify how active instances are determined | [
"Override",
"this",
"to",
"modify",
"how",
"active",
"instances",
"are",
"determined"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/service/AbstractRoutingStrategy.java#L61-L99 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/common/service/AbstractRoutingStrategy.java | AbstractRoutingStrategy.buildURL | protected URL buildURL(Map<String,String> headers, String instanceHostPort) throws MalformedURLException {
String origUrl = headers.get(Listener.METAINFO_REQUEST_URL);
if (origUrl == null || !origUrl.startsWith("http")) {
// other protocol: forward to standard services url
return... | java | protected URL buildURL(Map<String,String> headers, String instanceHostPort) throws MalformedURLException {
String origUrl = headers.get(Listener.METAINFO_REQUEST_URL);
if (origUrl == null || !origUrl.startsWith("http")) {
// other protocol: forward to standard services url
return... | [
"protected",
"URL",
"buildURL",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
",",
"String",
"instanceHostPort",
")",
"throws",
"MalformedURLException",
"{",
"String",
"origUrl",
"=",
"headers",
".",
"get",
"(",
"Listener",
".",
"METAINFO_REQUEST_URL... | Override this to build the destination URL differently. | [
"Override",
"this",
"to",
"build",
"the",
"destination",
"URL",
"differently",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/service/AbstractRoutingStrategy.java#L104-L122 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/common/translator/impl/EncodedStringTranslator.java | EncodedStringTranslator.toObject | public Object toObject(String pStr){
String decoded = null;
try{
decoded = decoder.decode(pStr);
}catch(DecoderException ex){
ex.printStackTrace();
throw new TranslationException(ex.getMessage());
}
return decoded;
} | java | public Object toObject(String pStr){
String decoded = null;
try{
decoded = decoder.decode(pStr);
}catch(DecoderException ex){
ex.printStackTrace();
throw new TranslationException(ex.getMessage());
}
return decoded;
} | [
"public",
"Object",
"toObject",
"(",
"String",
"pStr",
")",
"{",
"String",
"decoded",
"=",
"null",
";",
"try",
"{",
"decoded",
"=",
"decoder",
".",
"decode",
"(",
"pStr",
")",
";",
"}",
"catch",
"(",
"DecoderException",
"ex",
")",
"{",
"ex",
".",
"pr... | converts the passed in String to an equivalent object
@param pStr
@return Object | [
"converts",
"the",
"passed",
"in",
"String",
"to",
"an",
"equivalent",
"object"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/translator/impl/EncodedStringTranslator.java#L49-L58 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/activity/transform/CrossmapActivity.java | CrossmapActivity.runScript | protected void runScript(String mapperScript, Slurper slurper, Builder builder)
throws ActivityException, TransformerException {
CompilerConfiguration compilerConfig = new CompilerConfiguration();
compilerConfig.setScriptBaseClass(CrossmapScript.class.getName());
Binding binding = ... | java | protected void runScript(String mapperScript, Slurper slurper, Builder builder)
throws ActivityException, TransformerException {
CompilerConfiguration compilerConfig = new CompilerConfiguration();
compilerConfig.setScriptBaseClass(CrossmapScript.class.getName());
Binding binding = ... | [
"protected",
"void",
"runScript",
"(",
"String",
"mapperScript",
",",
"Slurper",
"slurper",
",",
"Builder",
"builder",
")",
"throws",
"ActivityException",
",",
"TransformerException",
"{",
"CompilerConfiguration",
"compilerConfig",
"=",
"new",
"CompilerConfiguration",
"... | Invokes the builder object for creating new output variable value. | [
"Invokes",
"the",
"builder",
"object",
"for",
"creating",
"new",
"output",
"variable",
"value",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/transform/CrossmapActivity.java#L133-L146 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/workflow/ProcessRuntimeContext.java | ProcessRuntimeContext.getDocRefs | public Map<String,String> getDocRefs() {
return new HashMap<String,String>() {
@Override
public String get(Object varName) {
VariableInstance varInst = processInstance.getVariable((String)varName);
if (varInst != null && varInst.getData() instanceof Docume... | java | public Map<String,String> getDocRefs() {
return new HashMap<String,String>() {
@Override
public String get(Object varName) {
VariableInstance varInst = processInstance.getVariable((String)varName);
if (varInst != null && varInst.getData() instanceof Docume... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getDocRefs",
"(",
")",
"{",
"return",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"String",
"get",
"(",
"Object",
"varName",
")",
"{",
"VariableInst... | For read-only access. | [
"For",
"read",
"-",
"only",
"access",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/ProcessRuntimeContext.java#L83-L93 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/workflow/ProcessRuntimeContext.java | ProcessRuntimeContext.getValue | public Object getValue(String key) {
if (isExpression(key))
return evaluate(key);
else
return getVariables().get(key);
} | java | public Object getValue(String key) {
if (isExpression(key))
return evaluate(key);
else
return getVariables().get(key);
} | [
"public",
"Object",
"getValue",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"isExpression",
"(",
"key",
")",
")",
"return",
"evaluate",
"(",
"key",
")",
";",
"else",
"return",
"getVariables",
"(",
")",
".",
"get",
"(",
"key",
")",
";",
"}"
] | Returns a variable value. Key can be a var name or an expression. | [
"Returns",
"a",
"variable",
"value",
".",
"Key",
"can",
"be",
"a",
"var",
"name",
"or",
"an",
"expression",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/ProcessRuntimeContext.java#L357-L362 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/dataaccess/file/PackageDir.java | PackageDir.getAssetFile | @ApiModelProperty(hidden=true)
public AssetFile getAssetFile(File file, AssetRevision rev) throws IOException {
AssetFile assetFile;
if (rev == null) {
rev = versionControl.getRevision(file);
if (rev == null) {
// presumably dropped-in asset
re... | java | @ApiModelProperty(hidden=true)
public AssetFile getAssetFile(File file, AssetRevision rev) throws IOException {
AssetFile assetFile;
if (rev == null) {
rev = versionControl.getRevision(file);
if (rev == null) {
// presumably dropped-in asset
re... | [
"@",
"ApiModelProperty",
"(",
"hidden",
"=",
"true",
")",
"public",
"AssetFile",
"getAssetFile",
"(",
"File",
"file",
",",
"AssetRevision",
"rev",
")",
"throws",
"IOException",
"{",
"AssetFile",
"assetFile",
";",
"if",
"(",
"rev",
"==",
"null",
")",
"{",
"... | Called during initial load the file param is a standard file. | [
"Called",
"during",
"initial",
"load",
"the",
"file",
"param",
"is",
"a",
"standard",
"file",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/dataaccess/file/PackageDir.java#L215-L237 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/UniversalNamespaceCache.java | UniversalNamespaceCache.storeAttribute | private void storeAttribute(Attr attribute) {
// examine the attributes in namespace xmlns
if (attribute.getNamespaceURI() != null
&& attribute.getNamespaceURI().equals(
XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
// Default namespace xmlns="uri goes here"... | java | private void storeAttribute(Attr attribute) {
// examine the attributes in namespace xmlns
if (attribute.getNamespaceURI() != null
&& attribute.getNamespaceURI().equals(
XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
// Default namespace xmlns="uri goes here"... | [
"private",
"void",
"storeAttribute",
"(",
"Attr",
"attribute",
")",
"{",
"// examine the attributes in namespace xmlns",
"if",
"(",
"attribute",
".",
"getNamespaceURI",
"(",
")",
"!=",
"null",
"&&",
"attribute",
".",
"getNamespaceURI",
"(",
")",
".",
"equals",
"("... | This method looks at an attribute and stores it, if it is a namespace
attribute.
@param attribute
to examine | [
"This",
"method",
"looks",
"at",
"an",
"attribute",
"and",
"stores",
"it",
"if",
"it",
"is",
"a",
"namespace",
"attribute",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/UniversalNamespaceCache.java#L90-L104 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/UniversalNamespaceCache.java | UniversalNamespaceCache.getNamespaceURI | public String getNamespaceURI(String prefix) {
if (prefix == null || prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) {
return prefix2Uri.get(DEFAULT_NS);
} else {
return prefix2Uri.get(prefix);
}
} | java | public String getNamespaceURI(String prefix) {
if (prefix == null || prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) {
return prefix2Uri.get(DEFAULT_NS);
} else {
return prefix2Uri.get(prefix);
}
} | [
"public",
"String",
"getNamespaceURI",
"(",
"String",
"prefix",
")",
"{",
"if",
"(",
"prefix",
"==",
"null",
"||",
"prefix",
".",
"equals",
"(",
"XMLConstants",
".",
"DEFAULT_NS_PREFIX",
")",
")",
"{",
"return",
"prefix2Uri",
".",
"get",
"(",
"DEFAULT_NS",
... | This method is called by XPath. It returns the default namespace, if the
prefix is null or "".
@param prefix
to search for
@return uri | [
"This",
"method",
"is",
"called",
"by",
"XPath",
".",
"It",
"returns",
"the",
"default",
"namespace",
"if",
"the",
"prefix",
"is",
"null",
"or",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/UniversalNamespaceCache.java#L119-L125 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/variable/Document.java | Document.getObject | public Object getObject(String type, Package pkg) {
if (type==null || type.equals(documentType)) {
if (object==null && content!=null) {
object = VariableTranslator.realToObject(pkg, documentType, content);
}
} else {
if (content!=null) {
... | java | public Object getObject(String type, Package pkg) {
if (type==null || type.equals(documentType)) {
if (object==null && content!=null) {
object = VariableTranslator.realToObject(pkg, documentType, content);
}
} else {
if (content!=null) {
... | [
"public",
"Object",
"getObject",
"(",
"String",
"type",
",",
"Package",
"pkg",
")",
"{",
"if",
"(",
"type",
"==",
"null",
"||",
"type",
".",
"equals",
"(",
"documentType",
")",
")",
"{",
"if",
"(",
"object",
"==",
"null",
"&&",
"content",
"!=",
"null... | content in object format | [
"content",
"in",
"object",
"format"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/variable/Document.java#L38-L54 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/task/TaskTemplate.java | TaskTemplate.isGroupMapped | public boolean isGroupMapped(String pGroupName){
List<String> userGroups = this.getUserGroups();
for(String g : userGroups){
if(g.equals(pGroupName)) return true;
}
return false;
} | java | public boolean isGroupMapped(String pGroupName){
List<String> userGroups = this.getUserGroups();
for(String g : userGroups){
if(g.equals(pGroupName)) return true;
}
return false;
} | [
"public",
"boolean",
"isGroupMapped",
"(",
"String",
"pGroupName",
")",
"{",
"List",
"<",
"String",
">",
"userGroups",
"=",
"this",
".",
"getUserGroups",
"(",
")",
";",
"for",
"(",
"String",
"g",
":",
"userGroups",
")",
"{",
"if",
"(",
"g",
".",
"equal... | Checked if the passed in GroupIName is mapped to the task
@param pGroupName
@return boolean results | [
"Checked",
"if",
"the",
"passed",
"in",
"GroupIName",
"is",
"mapped",
"to",
"the",
"task"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/task/TaskTemplate.java#L208-L214 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/task/TaskTemplate.java | TaskTemplate.isVariableMapped | public boolean isVariableMapped(String pVarName){
if(variables == null){
return false;
}
for (Variable vo : variables) {
if(vo.getName().equals(pVarName)){
return true;
}
}
return false;
} | java | public boolean isVariableMapped(String pVarName){
if(variables == null){
return false;
}
for (Variable vo : variables) {
if(vo.getName().equals(pVarName)){
return true;
}
}
return false;
} | [
"public",
"boolean",
"isVariableMapped",
"(",
"String",
"pVarName",
")",
"{",
"if",
"(",
"variables",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"Variable",
"vo",
":",
"variables",
")",
"{",
"if",
"(",
"vo",
".",
"getName",
"(",
... | Checked if the passed in Var Name is mapped to the task
@param pVarName
@return boolean results | [
"Checked",
"if",
"the",
"passed",
"in",
"Var",
"Name",
"is",
"mapped",
"to",
"the",
"task"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/task/TaskTemplate.java#L221-L231 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/DocumentWebServiceAdapter.java | DocumentWebServiceAdapter.createSoapRequest | protected SOAPMessage createSoapRequest(Object requestObj) throws ActivityException {
try {
MessageFactory messageFactory = getSoapMessageFactory();
SOAPMessage soapMessage = messageFactory.createMessage();
Map<Name,String> soapReqHeaders = getSoapRequestHeaders();
... | java | protected SOAPMessage createSoapRequest(Object requestObj) throws ActivityException {
try {
MessageFactory messageFactory = getSoapMessageFactory();
SOAPMessage soapMessage = messageFactory.createMessage();
Map<Name,String> soapReqHeaders = getSoapRequestHeaders();
... | [
"protected",
"SOAPMessage",
"createSoapRequest",
"(",
"Object",
"requestObj",
")",
"throws",
"ActivityException",
"{",
"try",
"{",
"MessageFactory",
"messageFactory",
"=",
"getSoapMessageFactory",
"(",
")",
";",
"SOAPMessage",
"soapMessage",
"=",
"messageFactory",
".",
... | Create the SOAP request object based on the document variable value. | [
"Create",
"the",
"SOAP",
"request",
"object",
"based",
"on",
"the",
"document",
"variable",
"value",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/DocumentWebServiceAdapter.java#L47-L79 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/asset/Asset.java | Asset.removeAttribute | public void removeAttribute(String name) {
if (getAttributes() != null) {
List<Attribute> toRemove = new ArrayList<Attribute>();
for (Attribute attr : getAttributes()) {
if (attr.getAttributeName().equals(name))
toRemove.add(attr);
}
... | java | public void removeAttribute(String name) {
if (getAttributes() != null) {
List<Attribute> toRemove = new ArrayList<Attribute>();
for (Attribute attr : getAttributes()) {
if (attr.getAttributeName().equals(name))
toRemove.add(attr);
}
... | [
"public",
"void",
"removeAttribute",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"getAttributes",
"(",
")",
"!=",
"null",
")",
"{",
"List",
"<",
"Attribute",
">",
"toRemove",
"=",
"new",
"ArrayList",
"<",
"Attribute",
">",
"(",
")",
";",
"for",
"(",
... | Takes care of multiples. | [
"Takes",
"care",
"of",
"multiples",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/asset/Asset.java#L280-L290 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/asset/Asset.java | Asset.parseVersionSpec | public static int parseVersionSpec(String versionString) throws NumberFormatException {
if (versionString == null)
return 0;
int dot = versionString.indexOf('.');
int major, minor;
if (dot > 0) {
major = Integer.parseInt(versionString.substring(0, dot));
... | java | public static int parseVersionSpec(String versionString) throws NumberFormatException {
if (versionString == null)
return 0;
int dot = versionString.indexOf('.');
int major, minor;
if (dot > 0) {
major = Integer.parseInt(versionString.substring(0, dot));
... | [
"public",
"static",
"int",
"parseVersionSpec",
"(",
"String",
"versionString",
")",
"throws",
"NumberFormatException",
"{",
"if",
"(",
"versionString",
"==",
"null",
")",
"return",
"0",
";",
"int",
"dot",
"=",
"versionString",
".",
"indexOf",
"(",
"'",
"'",
... | single digit without decimal means a major version not minor | [
"single",
"digit",
"without",
"decimal",
"means",
"a",
"major",
"version",
"not",
"minor"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/asset/Asset.java#L486-L500 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/asset/Asset.java | Asset.getFormat | public static String getFormat(String fileName) {
int lastDot = fileName.lastIndexOf('.');
if (lastDot == -1)
return null;
return getLanguage(fileName.substring(lastDot));
} | java | public static String getFormat(String fileName) {
int lastDot = fileName.lastIndexOf('.');
if (lastDot == -1)
return null;
return getLanguage(fileName.substring(lastDot));
} | [
"public",
"static",
"String",
"getFormat",
"(",
"String",
"fileName",
")",
"{",
"int",
"lastDot",
"=",
"fileName",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"lastDot",
"==",
"-",
"1",
")",
"return",
"null",
";",
"return",
"getLanguage",
"... | Takes into account special rules due to multiple languages per extension. | [
"Takes",
"into",
"account",
"special",
"rules",
"due",
"to",
"multiple",
"languages",
"per",
"extension",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/asset/Asset.java#L633-L638 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/provider/ProviderRegistry.java | ProviderRegistry.getDynamicVariableTranslator | public VariableTranslator getDynamicVariableTranslator(String className, ClassLoader parentLoader) {
try {
Class<?> clazz = CompiledJavaCache.getClassFromAssetName(parentLoader, className);
if (clazz != null)
return (VariableTranslator) (clazz).newInstance();
}
... | java | public VariableTranslator getDynamicVariableTranslator(String className, ClassLoader parentLoader) {
try {
Class<?> clazz = CompiledJavaCache.getClassFromAssetName(parentLoader, className);
if (clazz != null)
return (VariableTranslator) (clazz).newInstance();
}
... | [
"public",
"VariableTranslator",
"getDynamicVariableTranslator",
"(",
"String",
"className",
",",
"ClassLoader",
"parentLoader",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
"CompiledJavaCache",
".",
"getClassFromAssetName",
"(",
"parentLoader",
",",
"... | To get dynamic java variable translator
@param translatorClass
@param classLoader
@return | [
"To",
"get",
"dynamic",
"java",
"variable",
"translator"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/provider/ProviderRegistry.java#L92-L102 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/camel/TomcatCamelContext.java | TomcatCamelContext.onShutdown | public void onShutdown(){
if (instance==null) return;
try {
this.camelContext.stop();
}
catch (Exception ex) {
logger.severeException(ex.getMessage(), ex);
}
} | java | public void onShutdown(){
if (instance==null) return;
try {
this.camelContext.stop();
}
catch (Exception ex) {
logger.severeException(ex.getMessage(), ex);
}
} | [
"public",
"void",
"onShutdown",
"(",
")",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"return",
";",
"try",
"{",
"this",
".",
"camelContext",
".",
"stop",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"ex",
")",
"{",
"logger",
".",
"severeExcepti... | Method can be invoked when the server
shuts down | [
"Method",
"can",
"be",
"invoked",
"when",
"the",
"server",
"shuts",
"down"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/camel/TomcatCamelContext.java#L60-L68 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/xml/XmlPath.java | XmlPath.evaluate | public static String evaluate(XmlObject xmlbean, String path) {
XmlCursor cursor = xmlbean.newCursor();
String value;
// 1.2.3. use XQuery or selectPath
//
// cursor.toFirstChild();
// String defaultNamespace = cursor.namespaceForPrefix("");
// String namespaceDecl = "decla... | java | public static String evaluate(XmlObject xmlbean, String path) {
XmlCursor cursor = xmlbean.newCursor();
String value;
// 1.2.3. use XQuery or selectPath
//
// cursor.toFirstChild();
// String defaultNamespace = cursor.namespaceForPrefix("");
// String namespaceDecl = "decla... | [
"public",
"static",
"String",
"evaluate",
"(",
"XmlObject",
"xmlbean",
",",
"String",
"path",
")",
"{",
"XmlCursor",
"cursor",
"=",
"xmlbean",
".",
"newCursor",
"(",
")",
";",
"String",
"value",
";",
"// 1.2.3. use XQuery or selectPath",
"//",
"// cursor.to... | Using XPath or XQuery.
NOTE!!!! To use this code, need to include
xbean_xpath.jar, saxon9.jar, saxon9-dom.jar in CLASSPATH
in startWebLogic.cmd
@param xmlbean
@param path
@return | [
"Using",
"XPath",
"or",
"XQuery",
".",
"NOTE!!!!",
"To",
"use",
"this",
"code",
"need",
"to",
"include",
"xbean_xpath",
".",
"jar",
"saxon9",
".",
"jar",
"saxon9",
"-",
"dom",
".",
"jar",
"in",
"CLASSPATH",
"in",
"startWebLogic",
".",
"cmd"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/xml/XmlPath.java#L62-L104 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/config/YamlProperties.java | YamlProperties.parseGroupMap | protected void parseGroupMap(Map<String,Object> groupMap, Map<String,String> resultMap, String prefix) {
Object obj;
for (String groupKey : groupMap.keySet()) {
obj = groupMap.get(groupKey);
String key = prefix == null ? groupKey : prefix + "." + groupKey;
if (obj ins... | java | protected void parseGroupMap(Map<String,Object> groupMap, Map<String,String> resultMap, String prefix) {
Object obj;
for (String groupKey : groupMap.keySet()) {
obj = groupMap.get(groupKey);
String key = prefix == null ? groupKey : prefix + "." + groupKey;
if (obj ins... | [
"protected",
"void",
"parseGroupMap",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"groupMap",
",",
"Map",
"<",
"String",
",",
"String",
">",
"resultMap",
",",
"String",
"prefix",
")",
"{",
"Object",
"obj",
";",
"for",
"(",
"String",
"groupKey",
":",
... | Flattens the group map | [
"Flattens",
"the",
"group",
"map"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/config/YamlProperties.java#L148-L158 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/listener/ExternalEventHandlerBase.java | ExternalEventHandlerBase.notifyProcesses | protected Integer notifyProcesses(String eventName, Long eventInstId,
String message, int delay)
{
Integer status;
try {
EventServices eventManager = ServiceLocator.getEventServices();
status = eventManager.notifyProcess(
eventName,
... | java | protected Integer notifyProcesses(String eventName, Long eventInstId,
String message, int delay)
{
Integer status;
try {
EventServices eventManager = ServiceLocator.getEventServices();
status = eventManager.notifyProcess(
eventName,
... | [
"protected",
"Integer",
"notifyProcesses",
"(",
"String",
"eventName",
",",
"Long",
"eventInstId",
",",
"String",
"message",
",",
"int",
"delay",
")",
"{",
"Integer",
"status",
";",
"try",
"{",
"EventServices",
"eventManager",
"=",
"ServiceLocator",
".",
"getEve... | This method is used to wake up existing process instances.
@param eventName this is used to search for which process instances to inform
@param eventInstId ID of the external event instance
@param params parameters to be passed along with the RESUME message to the
waiting activity instances.
Important note: if the eve... | [
"This",
"method",
"is",
"used",
"to",
"wake",
"up",
"existing",
"process",
"instances",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/listener/ExternalEventHandlerBase.java#L135-L151 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/listener/ExternalEventHandlerBase.java | ExternalEventHandlerBase.createDocument | protected DocumentReference createDocument(String docType, Object document,
String ownerType, Long ownerId, Long processInstanceId, String searchKey1, String searchKey2)
throws EventHandlerException {
ListenerHelper helper = new ListenerHelper();
return helper.createDocument(docType, doc... | java | protected DocumentReference createDocument(String docType, Object document,
String ownerType, Long ownerId, Long processInstanceId, String searchKey1, String searchKey2)
throws EventHandlerException {
ListenerHelper helper = new ListenerHelper();
return helper.createDocument(docType, doc... | [
"protected",
"DocumentReference",
"createDocument",
"(",
"String",
"docType",
",",
"Object",
"document",
",",
"String",
"ownerType",
",",
"Long",
"ownerId",
",",
"Long",
"processInstanceId",
",",
"String",
"searchKey1",
",",
"String",
"searchKey2",
")",
"throws",
... | This method is used to create a document from external messages. The document reference
returned can be sent as parameters to start or inform processes.
@param docType this should be variable type if the document reference is to be bound
to variables.
@param document The document object itself, such as an XML bean doc... | [
"This",
"method",
"is",
"used",
"to",
"create",
"a",
"document",
"from",
"external",
"messages",
".",
"The",
"document",
"reference",
"returned",
"can",
"be",
"sent",
"as",
"parameters",
"to",
"start",
"or",
"inform",
"processes",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/listener/ExternalEventHandlerBase.java#L294-L299 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java | ObjectAdapterActivity.getRequestData | protected Object getRequestData() throws ActivityException {
String varname = getAttributeValue(REQUEST_VARIABLE);
Object request = varname == null ? null : getParameterValue(varname);
if (!StringHelper.isEmpty(getPreScript())) {
Object returnVal = executePreScript(request);
... | java | protected Object getRequestData() throws ActivityException {
String varname = getAttributeValue(REQUEST_VARIABLE);
Object request = varname == null ? null : getParameterValue(varname);
if (!StringHelper.isEmpty(getPreScript())) {
Object returnVal = executePreScript(request);
... | [
"protected",
"Object",
"getRequestData",
"(",
")",
"throws",
"ActivityException",
"{",
"String",
"varname",
"=",
"getAttributeValue",
"(",
"REQUEST_VARIABLE",
")",
";",
"Object",
"request",
"=",
"varname",
"==",
"null",
"?",
"null",
":",
"getParameterValue",
"(",
... | Override this method if need to translate data from variable
or need to get data elsewhere. The default
method assumes the data is in the variable REQUEST_VARIABLE
Also, if a translation is needed to convert data in internal
format to one required by external system, this is the place
for doing it.
@return
@throws Ac... | [
"Override",
"this",
"method",
"if",
"need",
"to",
"translate",
"data",
"from",
"variable",
"or",
"need",
"to",
"get",
"data",
"elsewhere",
".",
"The",
"default",
"method",
"assumes",
"the",
"data",
"is",
"in",
"the",
"variable",
"REQUEST_VARIABLE"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java#L226-L240 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java | ObjectAdapterActivity.getStubbedResponse | protected Response getStubbedResponse(Object requestObject) {
// compatibility
String resp = getStubResponse(externalRequestToString(requestObject));
if (resp != null) {
Response oldStubbed = new Response();
oldStubbed.setObject(resp);
oldStubbed.setContent(ex... | java | protected Response getStubbedResponse(Object requestObject) {
// compatibility
String resp = getStubResponse(externalRequestToString(requestObject));
if (resp != null) {
Response oldStubbed = new Response();
oldStubbed.setObject(resp);
oldStubbed.setContent(ex... | [
"protected",
"Response",
"getStubbedResponse",
"(",
"Object",
"requestObject",
")",
"{",
"// compatibility",
"String",
"resp",
"=",
"getStubResponse",
"(",
"externalRequestToString",
"(",
"requestObject",
")",
")",
";",
"if",
"(",
"resp",
"!=",
"null",
")",
"{",
... | Return stubbed response from external system. | [
"Return",
"stubbed",
"response",
"from",
"external",
"system",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java#L386-L441 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java | ObjectAdapterActivity.getPreScriptBindings | protected Map<String,Object> getPreScriptBindings(Object request) throws ActivityException {
Map<String,Object> binding = new HashMap<String,Object>();
String requestVar = this.getAttributeValue(REQUEST_VARIABLE);
if (requestVar != null && request instanceof String) {
binding.put("re... | java | protected Map<String,Object> getPreScriptBindings(Object request) throws ActivityException {
Map<String,Object> binding = new HashMap<String,Object>();
String requestVar = this.getAttributeValue(REQUEST_VARIABLE);
if (requestVar != null && request instanceof String) {
binding.put("re... | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"getPreScriptBindings",
"(",
"Object",
"request",
")",
"throws",
"ActivityException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"binding",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
... | Extra bindings for pre-script beyond process variable values. | [
"Extra",
"bindings",
"for",
"pre",
"-",
"script",
"beyond",
"process",
"variable",
"values",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java#L679-L689 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java | ObjectAdapterActivity.getPostScriptBindings | protected Map<String,Object> getPostScriptBindings(Object response) throws ActivityException {
Map<String,Object> binding = new HashMap<String,Object>();
String varname = this.getAttributeValue(RESPONSE_VARIABLE);
if (varname != null && response instanceof String) {
binding.put("resp... | java | protected Map<String,Object> getPostScriptBindings(Object response) throws ActivityException {
Map<String,Object> binding = new HashMap<String,Object>();
String varname = this.getAttributeValue(RESPONSE_VARIABLE);
if (varname != null && response instanceof String) {
binding.put("resp... | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"getPostScriptBindings",
"(",
"Object",
"response",
")",
"throws",
"ActivityException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"binding",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",... | Extra bindings for post-script beyond process variable values. | [
"Extra",
"bindings",
"for",
"post",
"-",
"script",
"beyond",
"process",
"variable",
"values",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java#L694-L705 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.