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/cache/CacheRegistration.java | CacheRegistration.preloadDynamicCaches | private void preloadDynamicCaches() {
List<CacheService> dynamicCacheServices = CacheRegistry.getInstance().getDynamicCacheServices();
for (CacheService dynamicCacheService : dynamicCacheServices) {
if (dynamicCacheService instanceof PreloadableCache) {
try {
... | java | private void preloadDynamicCaches() {
List<CacheService> dynamicCacheServices = CacheRegistry.getInstance().getDynamicCacheServices();
for (CacheService dynamicCacheService : dynamicCacheServices) {
if (dynamicCacheService instanceof PreloadableCache) {
try {
... | [
"private",
"void",
"preloadDynamicCaches",
"(",
")",
"{",
"List",
"<",
"CacheService",
">",
"dynamicCacheServices",
"=",
"CacheRegistry",
".",
"getInstance",
"(",
")",
".",
"getDynamicCacheServices",
"(",
")",
";",
"for",
"(",
"CacheService",
"dynamicCacheService",
... | Load caches registered as dynamic java services. | [
"Load",
"caches",
"registered",
"as",
"dynamic",
"java",
"services",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/cache/CacheRegistration.java#L127-L153 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/cache/CacheRegistration.java | CacheRegistration.onShutdown | public void onShutdown(){
CacheRegistry.getInstance().clearDynamicServices();// clear dynamic cache services
synchronized (allCaches) {
for (String cacheName : allCaches.keySet()) {
CacheService cachingObj= allCaches.get(cacheName);
cachingObj.clearCache();
... | java | public void onShutdown(){
CacheRegistry.getInstance().clearDynamicServices();// clear dynamic cache services
synchronized (allCaches) {
for (String cacheName : allCaches.keySet()) {
CacheService cachingObj= allCaches.get(cacheName);
cachingObj.clearCache();
... | [
"public",
"void",
"onShutdown",
"(",
")",
"{",
"CacheRegistry",
".",
"getInstance",
"(",
")",
".",
"clearDynamicServices",
"(",
")",
";",
"// clear dynamic cache services",
"synchronized",
"(",
"allCaches",
")",
"{",
"for",
"(",
"String",
"cacheName",
":",
"allC... | Method that gets invoked when the server
shuts down | [
"Method",
"that",
"gets",
"invoked",
"when",
"the",
"server",
"shuts",
"down"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/cache/CacheRegistration.java#L186-L194 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/cache/CacheRegistration.java | CacheRegistration.refreshCache | public void refreshCache(String cacheName, List<String> excludedFormats) {
CacheService cache = allCaches.get(cacheName);
if (cache != null) {
if (excludedFormats != null && cache instanceof ExcludableCache && excludedFormats.contains(((ExcludableCache)cache).getFormat())) {
... | java | public void refreshCache(String cacheName, List<String> excludedFormats) {
CacheService cache = allCaches.get(cacheName);
if (cache != null) {
if (excludedFormats != null && cache instanceof ExcludableCache && excludedFormats.contains(((ExcludableCache)cache).getFormat())) {
... | [
"public",
"void",
"refreshCache",
"(",
"String",
"cacheName",
",",
"List",
"<",
"String",
">",
"excludedFormats",
")",
"{",
"CacheService",
"cache",
"=",
"allCaches",
".",
"get",
"(",
"cacheName",
")",
";",
"if",
"(",
"cache",
"!=",
"null",
")",
"{",
"if... | Refreshes a particular cache by name.
@param cacheName the cache to refresh | [
"Refreshes",
"a",
"particular",
"cache",
"by",
"name",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/cache/CacheRegistration.java#L239-L254 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/Compatibility.java | Compatibility.getActivityImplementor | public static String getActivityImplementor(String className) throws IOException {
if (getActivityImplementors() != null) {
String newImpl = getActivityImplementors().get(className);
if (newImpl != null)
return newImpl;
}
return className;
} | java | public static String getActivityImplementor(String className) throws IOException {
if (getActivityImplementors() != null) {
String newImpl = getActivityImplementors().get(className);
if (newImpl != null)
return newImpl;
}
return className;
} | [
"public",
"static",
"String",
"getActivityImplementor",
"(",
"String",
"className",
")",
"throws",
"IOException",
"{",
"if",
"(",
"getActivityImplementors",
"(",
")",
"!=",
"null",
")",
"{",
"String",
"newImpl",
"=",
"getActivityImplementors",
"(",
")",
".",
"ge... | If the className argument needs to be mapped to a new implementor class,
returns the new class name; otherwise returns the unmodified argument. | [
"If",
"the",
"className",
"argument",
"needs",
"to",
"be",
"mapped",
"to",
"a",
"new",
"implementor",
"class",
"returns",
"the",
"new",
"class",
"name",
";",
"otherwise",
"returns",
"the",
"unmodified",
"argument",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/Compatibility.java#L103-L110 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/Compatibility.java | Compatibility.getEventHandler | public static String getEventHandler(String className) throws IOException {
if (getEventHandlers() != null) {
String newHandler = getEventHandlers().get(className);
if (newHandler != null)
return newHandler;
}
return className;
} | java | public static String getEventHandler(String className) throws IOException {
if (getEventHandlers() != null) {
String newHandler = getEventHandlers().get(className);
if (newHandler != null)
return newHandler;
}
return className;
} | [
"public",
"static",
"String",
"getEventHandler",
"(",
"String",
"className",
")",
"throws",
"IOException",
"{",
"if",
"(",
"getEventHandlers",
"(",
")",
"!=",
"null",
")",
"{",
"String",
"newHandler",
"=",
"getEventHandlers",
"(",
")",
".",
"get",
"(",
"clas... | If the className argument needs to be mapped to a new event handler class,
returns the new class name; otherwise returns the unmodified argument. | [
"If",
"the",
"className",
"argument",
"needs",
"to",
"be",
"mapped",
"to",
"a",
"new",
"event",
"handler",
"class",
"returns",
"the",
"new",
"class",
"name",
";",
"otherwise",
"returns",
"the",
"unmodified",
"argument",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/Compatibility.java#L122-L129 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/Compatibility.java | Compatibility.getVariableTranslator | public static String getVariableTranslator(String className) throws IOException {
if (getVariableTranslators() != null) {
String newTranslator = getVariableTranslators().get(className);
if (newTranslator != null)
return newTranslator;
}
return className;
... | java | public static String getVariableTranslator(String className) throws IOException {
if (getVariableTranslators() != null) {
String newTranslator = getVariableTranslators().get(className);
if (newTranslator != null)
return newTranslator;
}
return className;
... | [
"public",
"static",
"String",
"getVariableTranslator",
"(",
"String",
"className",
")",
"throws",
"IOException",
"{",
"if",
"(",
"getVariableTranslators",
"(",
")",
"!=",
"null",
")",
"{",
"String",
"newTranslator",
"=",
"getVariableTranslators",
"(",
")",
".",
... | If the className argument needs to be mapped to a new variable translator class,
returns the new class name; otherwise returns the unmodified argument. | [
"If",
"the",
"className",
"argument",
"needs",
"to",
"be",
"mapped",
"to",
"a",
"new",
"variable",
"translator",
"class",
"returns",
"the",
"new",
"class",
"name",
";",
"otherwise",
"returns",
"the",
"unmodified",
"argument",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/Compatibility.java#L135-L142 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/app/Compatibility.java | Compatibility.getVariableType | public static String getVariableType(String type) throws IOException {
if (getVariableTypes() != null) {
String newType = getVariableTypes().get(type);
if (newType != null)
return newType;
}
return type;
} | java | public static String getVariableType(String type) throws IOException {
if (getVariableTypes() != null) {
String newType = getVariableTypes().get(type);
if (newType != null)
return newType;
}
return type;
} | [
"public",
"static",
"String",
"getVariableType",
"(",
"String",
"type",
")",
"throws",
"IOException",
"{",
"if",
"(",
"getVariableTypes",
"(",
")",
"!=",
"null",
")",
"{",
"String",
"newType",
"=",
"getVariableTypes",
"(",
")",
".",
"get",
"(",
"type",
")"... | If the type argument needs to be mapped to a new variable type class,
returns the new class name; otherwise returns the unmodified argument. | [
"If",
"the",
"type",
"argument",
"needs",
"to",
"be",
"mapped",
"to",
"a",
"new",
"variable",
"type",
"class",
"returns",
"the",
"new",
"class",
"name",
";",
"otherwise",
"returns",
"the",
"unmodified",
"argument",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/app/Compatibility.java#L154-L161 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/camel/CamelRouteAdapter.java | CamelRouteAdapter.getRoutesDefinition | protected RoutesDefinition getRoutesDefinition(String name, String version) throws AdapterException {
String modifier = "";
Map<String,String> params = getHandlerParameters();
if (params != null) {
for (String paramName : params.keySet()) {
if (modifier.length() == 0)... | java | protected RoutesDefinition getRoutesDefinition(String name, String version) throws AdapterException {
String modifier = "";
Map<String,String> params = getHandlerParameters();
if (params != null) {
for (String paramName : params.keySet()) {
if (modifier.length() == 0)... | [
"protected",
"RoutesDefinition",
"getRoutesDefinition",
"(",
"String",
"name",
",",
"String",
"version",
")",
"throws",
"AdapterException",
"{",
"String",
"modifier",
"=",
"\"\"",
";",
"Map",
"<",
"String",
",",
"String",
">",
"params",
"=",
"getHandlerParameters"... | Returns the latest version whose attributes match the custom attribute
criteria specified via "CustomAttributes".
Override to apply additional or non-standard conditions.
@param version | [
"Returns",
"the",
"latest",
"version",
"whose",
"attributes",
"match",
"the",
"custom",
"attribute",
"criteria",
"specified",
"via",
"CustomAttributes",
".",
"Override",
"to",
"apply",
"additional",
"or",
"non",
"-",
"standard",
"conditions",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/camel/CamelRouteAdapter.java#L149-L182 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.createProcessInstance | ProcessInstance createProcessInstance(Long processId, String ownerType,
Long ownerId, String secondaryOwnerType, Long secondaryOwnerId,
String masterRequestId, Map<String,String> parameters, String label, String template)
throws ProcessException, DataAccessException
{
ProcessInst... | java | ProcessInstance createProcessInstance(Long processId, String ownerType,
Long ownerId, String secondaryOwnerType, Long secondaryOwnerId,
String masterRequestId, Map<String,String> parameters, String label, String template)
throws ProcessException, DataAccessException
{
ProcessInst... | [
"ProcessInstance",
"createProcessInstance",
"(",
"Long",
"processId",
",",
"String",
"ownerType",
",",
"Long",
"ownerId",
",",
"String",
"secondaryOwnerType",
",",
"Long",
"secondaryOwnerId",
",",
"String",
"masterRequestId",
",",
"Map",
"<",
"String",
",",
"String"... | Create a process instance. The status is PENDING_PROCESS | [
"Create",
"a",
"process",
"instance",
".",
"The",
"status",
"is",
"PENDING_PROCESS"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L279-L329 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.createTransitionInstances | void createTransitionInstances(ProcessInstance processInstanceVO,
List<Transition> transitions, Long fromActInstId)
throws ProcessException,DataAccessException {
TransitionInstance transInst;
for (Transition transition : transitions) {
try {
if (tooMany... | java | void createTransitionInstances(ProcessInstance processInstanceVO,
List<Transition> transitions, Long fromActInstId)
throws ProcessException,DataAccessException {
TransitionInstance transInst;
for (Transition transition : transitions) {
try {
if (tooMany... | [
"void",
"createTransitionInstances",
"(",
"ProcessInstance",
"processInstanceVO",
",",
"List",
"<",
"Transition",
">",
"transitions",
",",
"Long",
"fromActInstId",
")",
"throws",
"ProcessException",
",",
"DataAccessException",
"{",
"TransitionInstance",
"transInst",
";",
... | Handles the work Transitions for the passed in collection of Items | [
"Handles",
"the",
"work",
"Transitions",
"for",
"the",
"passed",
"in",
"collection",
"of",
"Items"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L467-L502 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.startProcessInstance | void startProcessInstance(ProcessInstance processInstanceVO, int delay)
throws ProcessException {
try {
Process process = getProcessDefinition(processInstanceVO);
edao.setProcessInstanceStatus(processInstanceVO.getId(), WorkStatus.STATUS_PENDING_PROCESS);
// setProcess... | java | void startProcessInstance(ProcessInstance processInstanceVO, int delay)
throws ProcessException {
try {
Process process = getProcessDefinition(processInstanceVO);
edao.setProcessInstanceStatus(processInstanceVO.getId(), WorkStatus.STATUS_PENDING_PROCESS);
// setProcess... | [
"void",
"startProcessInstance",
"(",
"ProcessInstance",
"processInstanceVO",
",",
"int",
"delay",
")",
"throws",
"ProcessException",
"{",
"try",
"{",
"Process",
"process",
"=",
"getProcessDefinition",
"(",
"processInstanceVO",
")",
";",
"edao",
".",
"setProcessInstanc... | Starting a process instance, which has been created already.
The method sets the status to "In Progress",
find the start activity, and sends an internal message to start the activity
@param processInstanceVO | [
"Starting",
"a",
"process",
"instance",
"which",
"has",
"been",
"created",
"already",
".",
"The",
"method",
"sets",
"the",
"status",
"to",
"In",
"Progress",
"find",
"the",
"start",
"activity",
"and",
"sends",
"an",
"internal",
"message",
"to",
"start",
"the"... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L561-L603 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.failActivityInstance | void failActivityInstance(InternalEvent event,
ProcessInstance processInst, Long activityId, Long activityInstId,
BaseActivity activity, Throwable cause) throws DataAccessException, MdwException, SQLException {
String tag = logtag(processInst.getProcessId(), processInst.getId(), activit... | java | void failActivityInstance(InternalEvent event,
ProcessInstance processInst, Long activityId, Long activityInstId,
BaseActivity activity, Throwable cause) throws DataAccessException, MdwException, SQLException {
String tag = logtag(processInst.getProcessId(), processInst.getId(), activit... | [
"void",
"failActivityInstance",
"(",
"InternalEvent",
"event",
",",
"ProcessInstance",
"processInst",
",",
"Long",
"activityId",
",",
"Long",
"activityInstId",
",",
"BaseActivity",
"activity",
",",
"Throwable",
"cause",
")",
"throws",
"DataAccessException",
",",
"MdwE... | Reports the error status of the activity instance to the activity manager | [
"Reports",
"the",
"error",
"status",
"of",
"the",
"activity",
"instance",
"to",
"the",
"activity",
"manager"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L621-L649 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.findTaskActionWorkTransition | private Transition findTaskActionWorkTransition(ProcessInstance parentInstance,
ActivityInstance activityInstance, String taskAction) {
if (taskAction == null)
return null;
Process processVO = getProcessDefinition(parentInstance);
Transition workTransVO = processVO.getTr... | java | private Transition findTaskActionWorkTransition(ProcessInstance parentInstance,
ActivityInstance activityInstance, String taskAction) {
if (taskAction == null)
return null;
Process processVO = getProcessDefinition(parentInstance);
Transition workTransVO = processVO.getTr... | [
"private",
"Transition",
"findTaskActionWorkTransition",
"(",
"ProcessInstance",
"parentInstance",
",",
"ActivityInstance",
"activityInstance",
",",
"String",
"taskAction",
")",
"{",
"if",
"(",
"taskAction",
"==",
"null",
")",
"return",
"null",
";",
"Process",
"proces... | Look up the appropriate work transition for an embedded exception handling subprocess.
@param parentInstance the parent process
@param activityInstance the activity in the main process
@param taskAction the selected task action
@return the matching work transition, if found | [
"Look",
"up",
"the",
"appropriate",
"work",
"transition",
"for",
"an",
"embedded",
"exception",
"handling",
"subprocess",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L1260-L1275 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.cancelProcessInstanceTree | private void cancelProcessInstanceTree(ProcessInstance pi)
throws Exception {
if (pi.getStatusCode().equals(WorkStatus.STATUS_COMPLETED) ||
pi.getStatusCode().equals(WorkStatus.STATUS_CANCELLED)) {
throw new ProcessException("ProcessInstance is not in a cancellable state");
... | java | private void cancelProcessInstanceTree(ProcessInstance pi)
throws Exception {
if (pi.getStatusCode().equals(WorkStatus.STATUS_COMPLETED) ||
pi.getStatusCode().equals(WorkStatus.STATUS_CANCELLED)) {
throw new ProcessException("ProcessInstance is not in a cancellable state");
... | [
"private",
"void",
"cancelProcessInstanceTree",
"(",
"ProcessInstance",
"pi",
")",
"throws",
"Exception",
"{",
"if",
"(",
"pi",
".",
"getStatusCode",
"(",
")",
".",
"equals",
"(",
"WorkStatus",
".",
"STATUS_COMPLETED",
")",
"||",
"pi",
".",
"getStatusCode",
"(... | Cancels the process instance as well as all descendant process instances.
Deregisters associated event wait instances. | [
"Cancels",
"the",
"process",
"instance",
"as",
"well",
"as",
"all",
"descendant",
"process",
"instances",
".",
"Deregisters",
"associated",
"event",
"wait",
"instances",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L1561-L1578 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.cancelProcessInstance | private void cancelProcessInstance(ProcessInstance pProcessInst)
throws Exception {
edao.cancelTransitionInstances(pProcessInst.getId(),
"ProcessInstance has been cancelled.", null);
edao.setProcessInstanceStatus(pProcessInst.getId(), WorkStatus.STATUS_CANCELLED);
edao.re... | java | private void cancelProcessInstance(ProcessInstance pProcessInst)
throws Exception {
edao.cancelTransitionInstances(pProcessInst.getId(),
"ProcessInstance has been cancelled.", null);
edao.setProcessInstanceStatus(pProcessInst.getId(), WorkStatus.STATUS_CANCELLED);
edao.re... | [
"private",
"void",
"cancelProcessInstance",
"(",
"ProcessInstance",
"pProcessInst",
")",
"throws",
"Exception",
"{",
"edao",
".",
"cancelTransitionInstances",
"(",
"pProcessInst",
".",
"getId",
"(",
")",
",",
"\"ProcessInstance has been cancelled.\"",
",",
"null",
")",
... | Cancels a single process instance.
It cancels all active transition instances, all event wait instances,
and sets the process instance into canceled status.
The method does not cancel task instances
@param pProcessInst
@return new WorkInstance | [
"Cancels",
"a",
"single",
"process",
"instance",
".",
"It",
"cancels",
"all",
"active",
"transition",
"instances",
"all",
"event",
"wait",
"instances",
"and",
"sets",
"the",
"process",
"instance",
"into",
"canceled",
"status",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L1590-L1597 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.resumeActivityInstance | private void resumeActivityInstance(ActivityInstance actInst, String pCompletionCode, Long documentId,
String message, int delay) throws MdwException, SQLException {
ProcessInstance pi = edao.getProcessInstance(actInst.getProcessInstanceId());
if (!this.isProcessInstanceResumable(pi)) {
... | java | private void resumeActivityInstance(ActivityInstance actInst, String pCompletionCode, Long documentId,
String message, int delay) throws MdwException, SQLException {
ProcessInstance pi = edao.getProcessInstance(actInst.getProcessInstanceId());
if (!this.isProcessInstanceResumable(pi)) {
... | [
"private",
"void",
"resumeActivityInstance",
"(",
"ActivityInstance",
"actInst",
",",
"String",
"pCompletionCode",
",",
"Long",
"documentId",
",",
"String",
"message",
",",
"int",
"delay",
")",
"throws",
"MdwException",
",",
"SQLException",
"{",
"ProcessInstance",
"... | Sends a RESUME internal event to resume the activity instance.
This may be called in the following cases:
1) received an external event (including the case the message is received before registration)
In this case, the argument message is populated.
2) when register even wait instance, and the even has already arrived... | [
"Sends",
"a",
"RESUME",
"internal",
"event",
"to",
"resume",
"the",
"activity",
"instance",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L1807-L1831 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/activity/template/VelocityTemplateActivity.java | VelocityTemplateActivity.createVelocityContext | protected VelocityContext createVelocityContext() throws ActivityException {
try {
VelocityContext context = null;
String toolboxFile = getAttributeValueSmart(VELOCITY_TOOLBOX_FILE);
if (toolboxFile != null && FileHelper.fileExistsOnClasspath(toolboxFile)) {
t... | java | protected VelocityContext createVelocityContext() throws ActivityException {
try {
VelocityContext context = null;
String toolboxFile = getAttributeValueSmart(VELOCITY_TOOLBOX_FILE);
if (toolboxFile != null && FileHelper.fileExistsOnClasspath(toolboxFile)) {
t... | [
"protected",
"VelocityContext",
"createVelocityContext",
"(",
")",
"throws",
"ActivityException",
"{",
"try",
"{",
"VelocityContext",
"context",
"=",
"null",
";",
"String",
"toolboxFile",
"=",
"getAttributeValueSmart",
"(",
"VELOCITY_TOOLBOX_FILE",
")",
";",
"if",
"("... | Creates the velocity context, adding process variables as parameters. | [
"Creates",
"the",
"velocity",
"context",
"adding",
"process",
"variables",
"as",
"parameters",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/template/VelocityTemplateActivity.java#L162-L189 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/activity/template/VelocityTemplateActivity.java | VelocityTemplateActivity.getAdditionalScriptBindings | protected Map<String,Object> getAdditionalScriptBindings() {
Map<String,Object> addlBindings = new HashMap<String,Object>(1);
addlBindings.put(VELOCITY_OUTPUT, velocityOutput);
return addlBindings;
} | java | protected Map<String,Object> getAdditionalScriptBindings() {
Map<String,Object> addlBindings = new HashMap<String,Object>(1);
addlBindings.put(VELOCITY_OUTPUT, velocityOutput);
return addlBindings;
} | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"getAdditionalScriptBindings",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"addlBindings",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
"1",
")",
";",
"addlBindings",
"... | Gets additional bindings for script execution, adding the velocity
output string as a special bind value. | [
"Gets",
"additional",
"bindings",
"for",
"script",
"execution",
"adding",
"the",
"velocity",
"output",
"string",
"as",
"a",
"special",
"bind",
"value",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/template/VelocityTemplateActivity.java#L195-L199 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/camel/DefaultNotifyHandler.java | DefaultNotifyHandler.handleEventMessage | public String handleEventMessage(String message, Object messageObj, Map<String,String> metaInfo) throws EventHandlerException {
return null;
} | java | public String handleEventMessage(String message, Object messageObj, Map<String,String> metaInfo) throws EventHandlerException {
return null;
} | [
"public",
"String",
"handleEventMessage",
"(",
"String",
"message",
",",
"Object",
"messageObj",
",",
"Map",
"<",
"String",
",",
"String",
">",
"metaInfo",
")",
"throws",
"EventHandlerException",
"{",
"return",
"null",
";",
"}"
] | This is for non-Camel style event handlers.
It is not used here. Overriding has no effect in the context of a Camel route. | [
"This",
"is",
"for",
"non",
"-",
"Camel",
"style",
"event",
"handlers",
".",
"It",
"is",
"not",
"used",
"here",
".",
"Overriding",
"has",
"no",
"effect",
"in",
"the",
"context",
"of",
"a",
"Camel",
"route",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/camel/DefaultNotifyHandler.java#L94-L96 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/event/ScheduledEventQueue.java | ScheduledEventQueue.scheduleInternalEvent | public void scheduleInternalEvent(String name, Date time, String message, String reference) {
schedule(name, time, message, reference);
} | java | public void scheduleInternalEvent(String name, Date time, String message, String reference) {
schedule(name, time, message, reference);
} | [
"public",
"void",
"scheduleInternalEvent",
"(",
"String",
"name",
",",
"Date",
"time",
",",
"String",
"message",
",",
"String",
"reference",
")",
"{",
"schedule",
"(",
"name",
",",
"time",
",",
"message",
",",
"reference",
")",
";",
"}"
] | Schedule a timer task, or a delayed event
@param name event name
@param time this must be database time (such as new Date(DatabaseAccess.getCurrentTime()+difference_in_milliseconds)
@param message message content for delayed event; null o/w | [
"Schedule",
"a",
"timer",
"task",
"or",
"a",
"delayed",
"event"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/ScheduledEventQueue.java#L171-L173 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/BaseData.java | BaseData.get | @Override
@Path("/{dataType}")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
String dataType = getSegment(path, 1);
if (dataType == null)
throw new ServiceException("Missing path segment: {dataType}");
try {
... | java | @Override
@Path("/{dataType}")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
String dataType = getSegment(path, 1);
if (dataType == null)
throw new ServiceException("Missing path segment: {dataType}");
try {
... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{dataType}\"",
")",
"public",
"JSONObject",
"get",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"throws",
"ServiceException",
",",
"JSONException",
"{",
"String",
"dataType",
"="... | Retrieve variableTypes or taskCategories. | [
"Retrieve",
"variableTypes",
"or",
"taskCategories",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/BaseData.java#L68-L99 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/activity/process/InvokeSubProcessActivity.java | InvokeSubProcessActivity.getProcInstFromDB | private ProcessInstance getProcInstFromDB(Long procInstId) throws DataAccessException {
TransactionWrapper transaction = null;
EngineDataAccessDB edao = new EngineDataAccessDB();
try {
transaction = edao.startTransaction();
return edao.getProcessInstance(procInstId);
... | java | private ProcessInstance getProcInstFromDB(Long procInstId) throws DataAccessException {
TransactionWrapper transaction = null;
EngineDataAccessDB edao = new EngineDataAccessDB();
try {
transaction = edao.startTransaction();
return edao.getProcessInstance(procInstId);
... | [
"private",
"ProcessInstance",
"getProcInstFromDB",
"(",
"Long",
"procInstId",
")",
"throws",
"DataAccessException",
"{",
"TransactionWrapper",
"transaction",
"=",
"null",
";",
"EngineDataAccessDB",
"edao",
"=",
"new",
"EngineDataAccessDB",
"(",
")",
";",
"try",
"{",
... | Method to get the Process Instance from the database
@param procInstId
@return
@throws DataAccessException | [
"Method",
"to",
"get",
"the",
"Process",
"Instance",
"from",
"the",
"database"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/process/InvokeSubProcessActivity.java#L331-L343 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/user/ContextEmailRecipients.java | ContextEmailRecipients.getRecipients | public List<String> getRecipients(String workgroupsAttr, String expressionAttr)
throws DataAccessException, ParseException {
List<String> recipients = new ArrayList<>();
if (workgroupsAttr != null) {
String workgroups = context.getAttribute(workgroupsAttr);
if (workgroups != ... | java | public List<String> getRecipients(String workgroupsAttr, String expressionAttr)
throws DataAccessException, ParseException {
List<String> recipients = new ArrayList<>();
if (workgroupsAttr != null) {
String workgroups = context.getAttribute(workgroupsAttr);
if (workgroups != ... | [
"public",
"List",
"<",
"String",
">",
"getRecipients",
"(",
"String",
"workgroupsAttr",
",",
"String",
"expressionAttr",
")",
"throws",
"DataAccessException",
",",
"ParseException",
"{",
"List",
"<",
"String",
">",
"recipients",
"=",
"new",
"ArrayList",
"<>",
"(... | Default behavior returns the UNION of addresses specified via the expression attribute
along with those specified by the designated workgroups attribute. | [
"Default",
"behavior",
"returns",
"the",
"UNION",
"of",
"addresses",
"specified",
"via",
"the",
"expression",
"attribute",
"along",
"with",
"those",
"specified",
"by",
"the",
"designated",
"workgroups",
"attribute",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/user/ContextEmailRecipients.java#L41-L68 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/listener/FallbackEventHandler.java | FallbackEventHandler.printServerInfo | @SuppressWarnings("unused")
private void printServerInfo() {
Context ctx;
try{
ctx = new InitialContext();
MBeanServer server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
ObjectName service = new ObjectName("com.bea:Name=RuntimeService," +
... | java | @SuppressWarnings("unused")
private void printServerInfo() {
Context ctx;
try{
ctx = new InitialContext();
MBeanServer server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
ObjectName service = new ObjectName("com.bea:Name=RuntimeService," +
... | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"private",
"void",
"printServerInfo",
"(",
")",
"{",
"Context",
"ctx",
";",
"try",
"{",
"ctx",
"=",
"new",
"InitialContext",
"(",
")",
";",
"MBeanServer",
"server",
"=",
"(",
"MBeanServer",
")",
"ctx",
".",
... | tried to access machine but that need WLS admin credential, so have not tried further | [
"tried",
"to",
"access",
"machine",
"but",
"that",
"need",
"WLS",
"admin",
"credential",
"so",
"have",
"not",
"tried",
"further"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/listener/FallbackEventHandler.java#L211-L238 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/report/MetricDataList.java | MetricDataList.getAverages | public List<Metric> getAverages(int span) {
Map<String,Metric> accum = new LinkedHashMap<>();
int count = span / period;
if (count > dataList.size())
count = dataList.size();
for (int i = dataList.size() - count; i < dataList.size(); i++) {
MetricData metricData =... | java | public List<Metric> getAverages(int span) {
Map<String,Metric> accum = new LinkedHashMap<>();
int count = span / period;
if (count > dataList.size())
count = dataList.size();
for (int i = dataList.size() - count; i < dataList.size(); i++) {
MetricData metricData =... | [
"public",
"List",
"<",
"Metric",
">",
"getAverages",
"(",
"int",
"span",
")",
"{",
"Map",
"<",
"String",
",",
"Metric",
">",
"accum",
"=",
"new",
"LinkedHashMap",
"<>",
"(",
")",
";",
"int",
"count",
"=",
"span",
"/",
"period",
";",
"if",
"(",
"cou... | Accumulated averages. | [
"Accumulated",
"averages",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/report/MetricDataList.java#L57-L79 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/report/MetricDataList.java | MetricDataList.getData | public List<MetricData> getData(int span) {
int count = span / period;
if (dataList.size() < count) {
if (dataList.isEmpty()) {
return dataList;
}
else {
// left-pad
List<MetricData> padded = new ArrayList<>(dataList);
... | java | public List<MetricData> getData(int span) {
int count = span / period;
if (dataList.size() < count) {
if (dataList.isEmpty()) {
return dataList;
}
else {
// left-pad
List<MetricData> padded = new ArrayList<>(dataList);
... | [
"public",
"List",
"<",
"MetricData",
">",
"getData",
"(",
"int",
"span",
")",
"{",
"int",
"count",
"=",
"span",
"/",
"period",
";",
"if",
"(",
"dataList",
".",
"size",
"(",
")",
"<",
"count",
")",
"{",
"if",
"(",
"dataList",
".",
"isEmpty",
"(",
... | Returns a left-padded list. | [
"Returns",
"a",
"left",
"-",
"padded",
"list",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/report/MetricDataList.java#L84-L109 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/MiniCrypter.java | MiniCrypter.encrypt | public static String encrypt(String input) {
try {
return encrypt(input, null);
} catch (GeneralSecurityException e) {
e.printStackTrace();
return null;
}
} | java | public static String encrypt(String input) {
try {
return encrypt(input, null);
} catch (GeneralSecurityException e) {
e.printStackTrace();
return null;
}
} | [
"public",
"static",
"String",
"encrypt",
"(",
"String",
"input",
")",
"{",
"try",
"{",
"return",
"encrypt",
"(",
"input",
",",
"null",
")",
";",
"}",
"catch",
"(",
"GeneralSecurityException",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"... | Encrypt a string using a default key
@param input data to encrypt
@return encrypted string | [
"Encrypt",
"a",
"string",
"using",
"a",
"default",
"key"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/MiniCrypter.java#L35-L42 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/MiniCrypter.java | MiniCrypter.encrypt | public static String encrypt(String input, String strkey)
throws GeneralSecurityException {
SecretKey key;
if (strkey != null) {
if (strkey.length() > 56)
strkey = strkey.substring(0, 55);
key = new SecretKeySpec(strkey.getBytes(), algorithm);
}
... | java | public static String encrypt(String input, String strkey)
throws GeneralSecurityException {
SecretKey key;
if (strkey != null) {
if (strkey.length() > 56)
strkey = strkey.substring(0, 55);
key = new SecretKeySpec(strkey.getBytes(), algorithm);
}
... | [
"public",
"static",
"String",
"encrypt",
"(",
"String",
"input",
",",
"String",
"strkey",
")",
"throws",
"GeneralSecurityException",
"{",
"SecretKey",
"key",
";",
"if",
"(",
"strkey",
"!=",
"null",
")",
"{",
"if",
"(",
"strkey",
".",
"length",
"(",
")",
... | Encrypt a string
@param input data to encrypt
@param strkey a default key will be used when passing null in
@return encrypted string | [
"Encrypt",
"a",
"string"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/MiniCrypter.java#L50-L68 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/MiniCrypter.java | MiniCrypter.decrypt | public static String decrypt(String encrypted) {
try {
return decrypt(encrypted, null);
} catch (GeneralSecurityException e) {
e.printStackTrace();
return null;
}
} | java | public static String decrypt(String encrypted) {
try {
return decrypt(encrypted, null);
} catch (GeneralSecurityException e) {
e.printStackTrace();
return null;
}
} | [
"public",
"static",
"String",
"decrypt",
"(",
"String",
"encrypted",
")",
"{",
"try",
"{",
"return",
"decrypt",
"(",
"encrypted",
",",
"null",
")",
";",
"}",
"catch",
"(",
"GeneralSecurityException",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
... | Decrypt a string using the default key
@param encrypted encrypted string to be decrypted
@return decrypted original data | [
"Decrypt",
"a",
"string",
"using",
"the",
"default",
"key"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/MiniCrypter.java#L75-L82 | train |
CenturyLinkCloud/mdw | mdw-hub/src/com/centurylink/mdw/hub/context/Mdw.java | Mdw.getHubOverride | public File getHubOverride(String path) throws IOException {
if (getOverrideRoot() != null) {
File hubOverride = new File(getOverrideRoot() + path);
if (hubOverride.isFile())
return hubOverride;
}
if (getDevOverrideRoot() != null && isDev()) {
... | java | public File getHubOverride(String path) throws IOException {
if (getOverrideRoot() != null) {
File hubOverride = new File(getOverrideRoot() + path);
if (hubOverride.isFile())
return hubOverride;
}
if (getDevOverrideRoot() != null && isDev()) {
... | [
"public",
"File",
"getHubOverride",
"(",
"String",
"path",
")",
"throws",
"IOException",
"{",
"if",
"(",
"getOverrideRoot",
"(",
")",
"!=",
"null",
")",
"{",
"File",
"hubOverride",
"=",
"new",
"File",
"(",
"getOverrideRoot",
"(",
")",
"+",
"path",
")",
"... | Finds overridden hub artifacts among assets.
Core dev override is also supported for vanilla hub development. | [
"Finds",
"overridden",
"hub",
"artifacts",
"among",
"assets",
".",
"Core",
"dev",
"override",
"is",
"also",
"supported",
"for",
"vanilla",
"hub",
"development",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-hub/src/com/centurylink/mdw/hub/context/Mdw.java#L105-L117 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/SoapWebServiceAdapter.java | SoapWebServiceAdapter.getRequestData | protected String getRequestData() throws ActivityException {
Object request = null;
String requestVarName = getAttributeValue(REQUEST_VARIABLE);
if (requestVarName == null)
throw new ActivityException("Missing attribute: " + REQUEST_VARIABLE);
String requestVarType = getParam... | java | protected String getRequestData() throws ActivityException {
Object request = null;
String requestVarName = getAttributeValue(REQUEST_VARIABLE);
if (requestVarName == null)
throw new ActivityException("Missing attribute: " + REQUEST_VARIABLE);
String requestVarType = getParam... | [
"protected",
"String",
"getRequestData",
"(",
")",
"throws",
"ActivityException",
"{",
"Object",
"request",
"=",
"null",
";",
"String",
"requestVarName",
"=",
"getAttributeValue",
"(",
"REQUEST_VARIABLE",
")",
";",
"if",
"(",
"requestVarName",
"==",
"null",
")",
... | Builds the request XML. | [
"Builds",
"the",
"request",
"XML",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/SoapWebServiceAdapter.java#L86-L123 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/SoapWebServiceAdapter.java | SoapWebServiceAdapter.onSuccess | @Override
public void onSuccess(String response)
throws ActivityException, ConnectionException, AdapterException {
try {
// set the variable value based on the unwrapped soap content
soapResponse = getSoapResponse(response);
Node childElem = unwrapSoapResponse(soapRes... | java | @Override
public void onSuccess(String response)
throws ActivityException, ConnectionException, AdapterException {
try {
// set the variable value based on the unwrapped soap content
soapResponse = getSoapResponse(response);
Node childElem = unwrapSoapResponse(soapRes... | [
"@",
"Override",
"public",
"void",
"onSuccess",
"(",
"String",
"response",
")",
"throws",
"ActivityException",
",",
"ConnectionException",
",",
"AdapterException",
"{",
"try",
"{",
"// set the variable value based on the unwrapped soap content",
"soapResponse",
"=",
"getSoa... | Overriding this method affords the opportunity to parse the response and
populate process variables as needed. | [
"Overriding",
"this",
"method",
"affords",
"the",
"opportunity",
"to",
"parse",
"the",
"response",
"and",
"populate",
"process",
"variables",
"as",
"needed",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/SoapWebServiceAdapter.java#L201-L233 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/SoapWebServiceAdapter.java | SoapWebServiceAdapter.getSoapAction | protected String getSoapAction() {
String soapAction = null;
try {
soapAction = getAttributeValueSmart(SOAP_ACTION);
}
catch (PropertyException ex) {
logger.severeException(ex.getMessage(), ex);
}
if (soapAction == null) {
// required ... | java | protected String getSoapAction() {
String soapAction = null;
try {
soapAction = getAttributeValueSmart(SOAP_ACTION);
}
catch (PropertyException ex) {
logger.severeException(ex.getMessage(), ex);
}
if (soapAction == null) {
// required ... | [
"protected",
"String",
"getSoapAction",
"(",
")",
"{",
"String",
"soapAction",
"=",
"null",
";",
"try",
"{",
"soapAction",
"=",
"getAttributeValueSmart",
"(",
"SOAP_ACTION",
")",
";",
"}",
"catch",
"(",
"PropertyException",
"ex",
")",
"{",
"logger",
".",
"se... | The SOAPAction HTTP request header value. | [
"The",
"SOAPAction",
"HTTP",
"request",
"header",
"value",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/soap/SoapWebServiceAdapter.java#L323-L340 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/activity/event/EventWaitActivity.java | EventWaitActivity.processMessage | protected void processMessage(String message) throws ActivityException {
try {
String rcvdMsgDocVar = getAttributeValueSmart(RECEIVED_MESSAGE_DOC_VAR);
if (rcvdMsgDocVar != null && !rcvdMsgDocVar.isEmpty()) {
Process processVO = getProcessDefinition();
Var... | java | protected void processMessage(String message) throws ActivityException {
try {
String rcvdMsgDocVar = getAttributeValueSmart(RECEIVED_MESSAGE_DOC_VAR);
if (rcvdMsgDocVar != null && !rcvdMsgDocVar.isEmpty()) {
Process processVO = getProcessDefinition();
Var... | [
"protected",
"void",
"processMessage",
"(",
"String",
"message",
")",
"throws",
"ActivityException",
"{",
"try",
"{",
"String",
"rcvdMsgDocVar",
"=",
"getAttributeValueSmart",
"(",
"RECEIVED_MESSAGE_DOC_VAR",
")",
";",
"if",
"(",
"rcvdMsgDocVar",
"!=",
"null",
"&&",... | You should override this method to process event messages.
The default method does nothing if Received Message Variable is not defined and returns WorkStatus.STATUS_COMPLETED.
If Received Message Variable is defined then
it would store the received message in that pre-defined document variable
Process Designer has to ... | [
"You",
"should",
"override",
"this",
"method",
"to",
"process",
"event",
"messages",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/event/EventWaitActivity.java#L188-L206 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/activity/event/EventWaitActivity.java | EventWaitActivity.updateSLA | protected void updateSLA(int seconds) throws ActivityException {
try {
ProcessExecutor engine = this.getEngine();
super.loginfo("Update activity timeout as " + seconds + " seconds");
InternalEvent delayMsg = InternalEvent.createActivityDelayMessage(this.getActivityInstance(),... | java | protected void updateSLA(int seconds) throws ActivityException {
try {
ProcessExecutor engine = this.getEngine();
super.loginfo("Update activity timeout as " + seconds + " seconds");
InternalEvent delayMsg = InternalEvent.createActivityDelayMessage(this.getActivityInstance(),... | [
"protected",
"void",
"updateSLA",
"(",
"int",
"seconds",
")",
"throws",
"ActivityException",
"{",
"try",
"{",
"ProcessExecutor",
"engine",
"=",
"this",
".",
"getEngine",
"(",
")",
";",
"super",
".",
"loginfo",
"(",
"\"Update activity timeout as \"",
"+",
"second... | Update SLA of this
@param seconds number of seconds from now as the new SLA
@throws ActivityException | [
"Update",
"SLA",
"of",
"this"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/activity/event/EventWaitActivity.java#L258-L270 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/Values.java | Values.get | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Retrieve values for an ownerType and ownerId",
notes="Response is a generic JSON object with names/values.")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
Map<String,Strin... | java | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Retrieve values for an ownerType and ownerId",
notes="Response is a generic JSON object with names/values.")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
Map<String,Strin... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{ownerType}/{ownerId}\"",
")",
"@",
"ApiOperation",
"(",
"value",
"=",
"\"Retrieve values for an ownerType and ownerId\"",
",",
"notes",
"=",
"\"Response is a generic JSON object with names/values.\"",
")",
"public",
"JSONObject",
"get",... | Retrieve values. | [
"Retrieve",
"values",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Values.java#L60-L84 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/Values.java | Values.post | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Create values for an ownerType and ownerId", response=StatusMessage.class)
@ApiImplicitParams({
@ApiImplicitParam(name="Values", paramType="body")})
public JSONObject post(String path, JSONObject content, Map<String,String> headers)
... | java | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Create values for an ownerType and ownerId", response=StatusMessage.class)
@ApiImplicitParams({
@ApiImplicitParam(name="Values", paramType="body")})
public JSONObject post(String path, JSONObject content, Map<String,String> headers)
... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{ownerType}/{ownerId}\"",
")",
"@",
"ApiOperation",
"(",
"value",
"=",
"\"Create values for an ownerType and ownerId\"",
",",
"response",
"=",
"StatusMessage",
".",
"class",
")",
"@",
"ApiImplicitParams",
"(",
"{",
"@",
"ApiImp... | Create values for owner type and id. | [
"Create",
"values",
"for",
"owner",
"type",
"and",
"id",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Values.java#L89-L97 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/Values.java | Values.put | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Update values for an ownerType and ownerId", response=StatusMessage.class)
@ApiImplicitParams({
@ApiImplicitParam(name="Values", paramType="body")})
public JSONObject put(String path, JSONObject content, Map<String,String> headers)
... | java | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Update values for an ownerType and ownerId", response=StatusMessage.class)
@ApiImplicitParams({
@ApiImplicitParam(name="Values", paramType="body")})
public JSONObject put(String path, JSONObject content, Map<String,String> headers)
... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{ownerType}/{ownerId}\"",
")",
"@",
"ApiOperation",
"(",
"value",
"=",
"\"Update values for an ownerType and ownerId\"",
",",
"response",
"=",
"StatusMessage",
".",
"class",
")",
"@",
"ApiImplicitParams",
"(",
"{",
"@",
"ApiImp... | Update values for owner type and id.
Existing values are always overwritten. | [
"Update",
"values",
"for",
"owner",
"type",
"and",
"id",
".",
"Existing",
"values",
"are",
"always",
"overwritten",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Values.java#L103-L147 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/Values.java | Values.delete | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Delete values for an ownerType and ownerId", response=StatusMessage.class)
public JSONObject delete(String path, JSONObject content, Map<String,String> headers)
throws ServiceException, JSONException {
JSONObject empty = new JsonObje... | java | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Delete values for an ownerType and ownerId", response=StatusMessage.class)
public JSONObject delete(String path, JSONObject content, Map<String,String> headers)
throws ServiceException, JSONException {
JSONObject empty = new JsonObje... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{ownerType}/{ownerId}\"",
")",
"@",
"ApiOperation",
"(",
"value",
"=",
"\"Delete values for an ownerType and ownerId\"",
",",
"response",
"=",
"StatusMessage",
".",
"class",
")",
"public",
"JSONObject",
"delete",
"(",
"String",
... | Delete values for owner type and id. | [
"Delete",
"values",
"for",
"owner",
"type",
"and",
"id",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Values.java#L152-L159 | train |
CenturyLinkCloud/mdw | mdw-hub/src/com/centurylink/mdw/hub/servlet/AttachmentServlet.java | AttachmentServlet.authorize | private void authorize(HttpSession session, Action action, Entity entity, String location)
throws AuthorizationException, DataAccessException {
AuthenticatedUser user = (AuthenticatedUser)session.getAttribute("authenticatedUser");
if (user == null && ApplicationContext.getServiceUser() != n... | java | private void authorize(HttpSession session, Action action, Entity entity, String location)
throws AuthorizationException, DataAccessException {
AuthenticatedUser user = (AuthenticatedUser)session.getAttribute("authenticatedUser");
if (user == null && ApplicationContext.getServiceUser() != n... | [
"private",
"void",
"authorize",
"(",
"HttpSession",
"session",
",",
"Action",
"action",
",",
"Entity",
"entity",
",",
"String",
"location",
")",
"throws",
"AuthorizationException",
",",
"DataAccessException",
"{",
"AuthenticatedUser",
"user",
"=",
"(",
"Authenticate... | Also audit logs create and delete. | [
"Also",
"audit",
"logs",
"create",
"and",
"delete",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-hub/src/com/centurylink/mdw/hub/servlet/AttachmentServlet.java#L161-L181 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/asset/AssetServicesImpl.java | AssetServicesImpl.getAssets | public PackageAssets getAssets(String packageName, boolean withVcsInfo) throws ServiceException {
try {
PackageDir pkgDir = getPackageDir(packageName);
if (pkgDir == null) {
pkgDir = getGhostPackage(packageName);
if (pkgDir == null)
thr... | java | public PackageAssets getAssets(String packageName, boolean withVcsInfo) throws ServiceException {
try {
PackageDir pkgDir = getPackageDir(packageName);
if (pkgDir == null) {
pkgDir = getGhostPackage(packageName);
if (pkgDir == null)
thr... | [
"public",
"PackageAssets",
"getAssets",
"(",
"String",
"packageName",
",",
"boolean",
"withVcsInfo",
")",
"throws",
"ServiceException",
"{",
"try",
"{",
"PackageDir",
"pkgDir",
"=",
"getPackageDir",
"(",
"packageName",
")",
";",
"if",
"(",
"pkgDir",
"==",
"null"... | Returns all the assets for the specified package.
Does not use the AssetCache. | [
"Returns",
"all",
"the",
"assets",
"for",
"the",
"specified",
"package",
".",
"Does",
"not",
"use",
"the",
"AssetCache",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/asset/AssetServicesImpl.java#L138-L172 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/asset/AssetServicesImpl.java | AssetServicesImpl.findPackageDirs | private List<PackageDir> findPackageDirs(List<File> dirs, List<File> excludes) throws IOException, DataAccessException {
List<PackageDir> pkgSubDirs = new ArrayList<>();
List<File> allSubDirs = new ArrayList<>();
for (File dir : dirs) {
MdwIgnore mdwIgnore = new MdwIgnore(dir);
... | java | private List<PackageDir> findPackageDirs(List<File> dirs, List<File> excludes) throws IOException, DataAccessException {
List<PackageDir> pkgSubDirs = new ArrayList<>();
List<File> allSubDirs = new ArrayList<>();
for (File dir : dirs) {
MdwIgnore mdwIgnore = new MdwIgnore(dir);
... | [
"private",
"List",
"<",
"PackageDir",
">",
"findPackageDirs",
"(",
"List",
"<",
"File",
">",
"dirs",
",",
"List",
"<",
"File",
">",
"excludes",
")",
"throws",
"IOException",
",",
"DataAccessException",
"{",
"List",
"<",
"PackageDir",
">",
"pkgSubDirs",
"=",
... | Finds the next level of sibling PackageDirs under a set of non-package dirs. | [
"Finds",
"the",
"next",
"level",
"of",
"sibling",
"PackageDirs",
"under",
"a",
"set",
"of",
"non",
"-",
"package",
"dirs",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/asset/AssetServicesImpl.java#L350-L372 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/asset/AssetServicesImpl.java | AssetServicesImpl.getAssetVersionControl | private VersionControl getAssetVersionControl() throws IOException, DataAccessException {
VersionControl vc = getVersionControl();
if (vc == null)
vc = DataAccess.getAssetVersionControl(assetRoot);
return vc;
} | java | private VersionControl getAssetVersionControl() throws IOException, DataAccessException {
VersionControl vc = getVersionControl();
if (vc == null)
vc = DataAccess.getAssetVersionControl(assetRoot);
return vc;
} | [
"private",
"VersionControl",
"getAssetVersionControl",
"(",
")",
"throws",
"IOException",
",",
"DataAccessException",
"{",
"VersionControl",
"vc",
"=",
"getVersionControl",
"(",
")",
";",
"if",
"(",
"vc",
"==",
"null",
")",
"vc",
"=",
"DataAccess",
".",
"getAsse... | Falls back to DataAccess version control for asset versioning. | [
"Falls",
"back",
"to",
"DataAccess",
"version",
"control",
"for",
"asset",
"versioning",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/asset/AssetServicesImpl.java#L483-L488 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/asset/AssetServicesImpl.java | AssetServicesImpl.getImplAsset | public AssetInfo getImplAsset(String className) throws ServiceException {
int lastDot = className.lastIndexOf('.');
if (lastDot > 0 && lastDot < className.length() - 1) {
String assetRoot = className.substring(0, lastDot) + "/" + className.substring(lastDot + 1);
AssetInfo im... | java | public AssetInfo getImplAsset(String className) throws ServiceException {
int lastDot = className.lastIndexOf('.');
if (lastDot > 0 && lastDot < className.length() - 1) {
String assetRoot = className.substring(0, lastDot) + "/" + className.substring(lastDot + 1);
AssetInfo im... | [
"public",
"AssetInfo",
"getImplAsset",
"(",
"String",
"className",
")",
"throws",
"ServiceException",
"{",
"int",
"lastDot",
"=",
"className",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"lastDot",
">",
"0",
"&&",
"lastDot",
"<",
"className",
"... | Returns either Java or Kotlin asset implementor for a class. Null if not found. | [
"Returns",
"either",
"Java",
"or",
"Kotlin",
"asset",
"implementor",
"for",
"a",
"class",
".",
"Null",
"if",
"not",
"found",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/asset/AssetServicesImpl.java#L553-L562 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/config/YamlPropertyManager.java | YamlPropertyManager.getValue | private String getValue(String name) {
for (YamlProperties yamlProp : yamlProps) {
String value = yamlProp.getString(name);
if (value != null)
return value;
}
if (javaProps != null) {
for (Properties javaProp : javaProps) {
Stri... | java | private String getValue(String name) {
for (YamlProperties yamlProp : yamlProps) {
String value = yamlProp.getString(name);
if (value != null)
return value;
}
if (javaProps != null) {
for (Properties javaProp : javaProps) {
Stri... | [
"private",
"String",
"getValue",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"YamlProperties",
"yamlProp",
":",
"yamlProps",
")",
"{",
"String",
"value",
"=",
"yamlProp",
".",
"getString",
"(",
"name",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
... | Reads flat or structured values from yaml.
If not found, fall back to java properties. | [
"Reads",
"flat",
"or",
"structured",
"values",
"from",
"yaml",
".",
"If",
"not",
"found",
"fall",
"back",
"to",
"java",
"properties",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/config/YamlPropertyManager.java#L214-L228 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/kotlin/KotlinAccess.java | KotlinAccess.putScript | public static void putScript(String name, KotlinCompiledScript script) {
getInstance().scripts.put(name, script);
} | java | public static void putScript(String name, KotlinCompiledScript script) {
getInstance().scripts.put(name, script);
} | [
"public",
"static",
"void",
"putScript",
"(",
"String",
"name",
",",
"KotlinCompiledScript",
"script",
")",
"{",
"getInstance",
"(",
")",
".",
"scripts",
".",
"put",
"(",
"name",
",",
"script",
")",
";",
"}"
] | Must be public for access from Kotlin. | [
"Must",
"be",
"public",
"for",
"access",
"from",
"Kotlin",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/kotlin/KotlinAccess.java#L69-L71 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/TextAdapterActivity.java | TextAdapterActivity.handleConnectionException | protected void handleConnectionException(int errorCode, Throwable originalCause)
throws ActivityException {
InternalEvent message = InternalEvent.createActivityStartMessage(getActivityId(),
getProcessInstanceId(), getWorkTransitionInstanceId(), getMasterRequestId(),
COMPCODE_... | java | protected void handleConnectionException(int errorCode, Throwable originalCause)
throws ActivityException {
InternalEvent message = InternalEvent.createActivityStartMessage(getActivityId(),
getProcessInstanceId(), getWorkTransitionInstanceId(), getMasterRequestId(),
COMPCODE_... | [
"protected",
"void",
"handleConnectionException",
"(",
"int",
"errorCode",
",",
"Throwable",
"originalCause",
")",
"throws",
"ActivityException",
"{",
"InternalEvent",
"message",
"=",
"InternalEvent",
".",
"createActivityStartMessage",
"(",
"getActivityId",
"(",
")",
",... | Typically you should not override this method. ConnectionPoolAdapter
does override this with internal MDW logic.
@param errorCode
@throws ActivityException | [
"Typically",
"you",
"should",
"not",
"override",
"this",
"method",
".",
"ConnectionPoolAdapter",
"does",
"override",
"this",
"with",
"internal",
"MDW",
"logic",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/TextAdapterActivity.java#L414-L428 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/TextAdapterActivity.java | TextAdapterActivity.directInvoke | public Response directInvoke(String request, int timeout, Map<String,String> meta_data)
throws AdapterException, ConnectionException {
init();
if (logger == null)
logger = LoggerUtil.getStandardLogger();
Object connection = null;
try {
connection = ope... | java | public Response directInvoke(String request, int timeout, Map<String,String> meta_data)
throws AdapterException, ConnectionException {
init();
if (logger == null)
logger = LoggerUtil.getStandardLogger();
Object connection = null;
try {
connection = ope... | [
"public",
"Response",
"directInvoke",
"(",
"String",
"request",
",",
"int",
"timeout",
",",
"Map",
"<",
"String",
",",
"String",
">",
"meta_data",
")",
"throws",
"AdapterException",
",",
"ConnectionException",
"{",
"init",
"(",
")",
";",
"if",
"(",
"logger",... | This method is used for directly invoke the adapter activity
from code, rather than as part of process execution flow. | [
"This",
"method",
"is",
"used",
"for",
"directly",
"invoke",
"the",
"adapter",
"activity",
"from",
"code",
"rather",
"than",
"as",
"part",
"of",
"process",
"execution",
"flow",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/TextAdapterActivity.java#L656-L669 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutor.java | ProcessExecutor.createTransitionInstance | public TransitionInstance createTransitionInstance(Transition transition, Long pProcessInstId)
throws DataAccessException {
TransactionWrapper transaction=null;
try {
transaction = startTransaction();
return engineImpl.createTransitionInstance(transition, pProcessInstId);
... | java | public TransitionInstance createTransitionInstance(Transition transition, Long pProcessInstId)
throws DataAccessException {
TransactionWrapper transaction=null;
try {
transaction = startTransaction();
return engineImpl.createTransitionInstance(transition, pProcessInstId);
... | [
"public",
"TransitionInstance",
"createTransitionInstance",
"(",
"Transition",
"transition",
",",
"Long",
"pProcessInstId",
")",
"throws",
"DataAccessException",
"{",
"TransactionWrapper",
"transaction",
"=",
"null",
";",
"try",
"{",
"transaction",
"=",
"startTransaction"... | Creates a new instance of the WorkTransationInstance entity
@param transition
@param pProcessInstId
@return WorkTransitionInstance object | [
"Creates",
"a",
"new",
"instance",
"of",
"the",
"WorkTransationInstance",
"entity"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutor.java#L631-L647 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutor.java | ProcessExecutor.lockActivityInstance | public Integer lockActivityInstance(Long actInstId)
throws DataAccessException {
try {
if (!isInTransaction()) throw
new DataAccessException("Cannot lock activity instance without a transaction");
return engineImpl.getDataAccess().lockActivityInstance(actInstId);
... | java | public Integer lockActivityInstance(Long actInstId)
throws DataAccessException {
try {
if (!isInTransaction()) throw
new DataAccessException("Cannot lock activity instance without a transaction");
return engineImpl.getDataAccess().lockActivityInstance(actInstId);
... | [
"public",
"Integer",
"lockActivityInstance",
"(",
"Long",
"actInstId",
")",
"throws",
"DataAccessException",
"{",
"try",
"{",
"if",
"(",
"!",
"isInTransaction",
"(",
")",
")",
"throw",
"new",
"DataAccessException",
"(",
"\"Cannot lock activity instance without a transac... | This method must be called within the same transaction scope (namely engine is already started
@param actInstId
@throws DataAccessException | [
"This",
"method",
"must",
"be",
"called",
"within",
"the",
"same",
"transaction",
"scope",
"(",
"namely",
"engine",
"is",
"already",
"started"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutor.java#L1168-L1177 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutor.java | ProcessExecutor.lockProcessInstance | public Integer lockProcessInstance(Long procInstId)
throws DataAccessException {
try {
if (!isInTransaction()) throw
new DataAccessException("Cannot lock activity instance without a transaction");
return engineImpl.getDataAccess().lockProcessInstance(procInstId);
... | java | public Integer lockProcessInstance(Long procInstId)
throws DataAccessException {
try {
if (!isInTransaction()) throw
new DataAccessException("Cannot lock activity instance without a transaction");
return engineImpl.getDataAccess().lockProcessInstance(procInstId);
... | [
"public",
"Integer",
"lockProcessInstance",
"(",
"Long",
"procInstId",
")",
"throws",
"DataAccessException",
"{",
"try",
"{",
"if",
"(",
"!",
"isInTransaction",
"(",
")",
")",
"throw",
"new",
"DataAccessException",
"(",
"\"Cannot lock activity instance without a transac... | this method must be called within the same transaction scope (namely engine is already started
@param procInstId
@throws DataAccessException | [
"this",
"method",
"must",
"be",
"called",
"within",
"the",
"same",
"transaction",
"scope",
"(",
"namely",
"engine",
"is",
"already",
"started"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutor.java#L1184-L1193 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/GitVcs.java | GitVcs.get | @Override
@Path("{package}/{asset}")
public JSONObject get(String assetPath, Map<String,String> headers)
throws ServiceException, JSONException {
AssetServices assetServices = ServiceLocator.getAssetServices();
AssetInfo asset = assetServices.getAsset(assetPath.substring(7), true);
... | java | @Override
@Path("{package}/{asset}")
public JSONObject get(String assetPath, Map<String,String> headers)
throws ServiceException, JSONException {
AssetServices assetServices = ServiceLocator.getAssetServices();
AssetInfo asset = assetServices.getAsset(assetPath.substring(7), true);
... | [
"@",
"Override",
"@",
"Path",
"(",
"\"{package}/{asset}\"",
")",
"public",
"JSONObject",
"get",
"(",
"String",
"assetPath",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"throws",
"ServiceException",
",",
"JSONException",
"{",
"AssetServices",
... | Retrieves commit info for an asset. | [
"Retrieves",
"commit",
"info",
"for",
"an",
"asset",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/GitVcs.java#L91-L102 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/timer/CodeTimer.java | CodeTimer.getDurationMicro | public long getDurationMicro() {
if (startNano != 0) {
if (running)
return ((long)(System.nanoTime() - startNano)) / 1000;
else if (stopNano != startNano)
return ((long)(stopNano - startNano)) / 1000;
}
return 0;
} | java | public long getDurationMicro() {
if (startNano != 0) {
if (running)
return ((long)(System.nanoTime() - startNano)) / 1000;
else if (stopNano != startNano)
return ((long)(stopNano - startNano)) / 1000;
}
return 0;
} | [
"public",
"long",
"getDurationMicro",
"(",
")",
"{",
"if",
"(",
"startNano",
"!=",
"0",
")",
"{",
"if",
"(",
"running",
")",
"return",
"(",
"(",
"long",
")",
"(",
"System",
".",
"nanoTime",
"(",
")",
"-",
"startNano",
")",
")",
"/",
"1000",
";",
... | Timer duration in microseconds. | [
"Timer",
"duration",
"in",
"microseconds",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/timer/CodeTimer.java#L78-L86 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/task/TaskTemplateCache.java | TaskTemplateCache.getTemplateForName | public static TaskTemplate getTemplateForName(String taskName) {
for (int i = 0; i < taskVoCache.size(); i++) {
TaskTemplate task = taskVoCache.get(i);
if (task.getTaskName().equals(taskName)) {
return task;
}
}
return null;
} | java | public static TaskTemplate getTemplateForName(String taskName) {
for (int i = 0; i < taskVoCache.size(); i++) {
TaskTemplate task = taskVoCache.get(i);
if (task.getTaskName().equals(taskName)) {
return task;
}
}
return null;
} | [
"public",
"static",
"TaskTemplate",
"getTemplateForName",
"(",
"String",
"taskName",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"taskVoCache",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"TaskTemplate",
"task",
"=",
"taskVoCache",
... | Return the latest task for the given name. | [
"Return",
"the",
"latest",
"task",
"for",
"the",
"given",
"name",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/task/TaskTemplateCache.java#L89-L97 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/task/TaskTemplateCache.java | TaskTemplateCache.getTaskTemplate | public static TaskTemplate getTaskTemplate(String logicalId) {
for (int i = 0; i < taskVoCache.size(); i++) {
TaskTemplate task = taskVoCache.get(i);
if (logicalId.equals(task.getLogicalId())) {
return task;
}
}
return null;
} | java | public static TaskTemplate getTaskTemplate(String logicalId) {
for (int i = 0; i < taskVoCache.size(); i++) {
TaskTemplate task = taskVoCache.get(i);
if (logicalId.equals(task.getLogicalId())) {
return task;
}
}
return null;
} | [
"public",
"static",
"TaskTemplate",
"getTaskTemplate",
"(",
"String",
"logicalId",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"taskVoCache",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"TaskTemplate",
"task",
"=",
"taskVoCache",
".... | Return the latest task id for the given logical ID | [
"Return",
"the",
"latest",
"task",
"id",
"for",
"the",
"given",
"logical",
"ID"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/task/TaskTemplateCache.java#L126-L134 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/data/task/TaskTemplateCache.java | TaskTemplateCache.getTaskTemplate | public static TaskTemplate getTaskTemplate(AssetVersionSpec assetVersionSpec) throws Exception {
TaskTemplate taskTemplate = templateVersions.get(assetVersionSpec.toString());
if (taskTemplate == null) {
if (assetVersionSpec.getPackageName() != null) {
List<Package> pkgVOs = ... | java | public static TaskTemplate getTaskTemplate(AssetVersionSpec assetVersionSpec) throws Exception {
TaskTemplate taskTemplate = templateVersions.get(assetVersionSpec.toString());
if (taskTemplate == null) {
if (assetVersionSpec.getPackageName() != null) {
List<Package> pkgVOs = ... | [
"public",
"static",
"TaskTemplate",
"getTaskTemplate",
"(",
"AssetVersionSpec",
"assetVersionSpec",
")",
"throws",
"Exception",
"{",
"TaskTemplate",
"taskTemplate",
"=",
"templateVersions",
".",
"get",
"(",
"assetVersionSpec",
".",
"toString",
"(",
")",
")",
";",
"i... | Get the latest task template that matched the assetVersionSpec.
Uses the task logicalId to match to the taskVoCache, so if the logical ID
in the matching asset is not unique, then the latest template with this logicalId
will be returned regardless of assetVersionSpec.
So CHANGE THE LOGICAL_ID if you want in-flight task... | [
"Get",
"the",
"latest",
"task",
"template",
"that",
"matched",
"the",
"assetVersionSpec",
".",
"Uses",
"the",
"task",
"logicalId",
"to",
"match",
"to",
"the",
"taskVoCache",
"so",
"if",
"the",
"logical",
"ID",
"in",
"the",
"matching",
"asset",
"is",
"not",
... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/data/task/TaskTemplateCache.java#L144-L171 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/api/SwaggerAnnotationsReader.java | SwaggerAnnotationsReader.read | public static void read(Swagger swagger, Set<Class<?>> classes) {
final SwaggerAnnotationsReader reader = new SwaggerAnnotationsReader(swagger);
for (Class<?> cls : classes) {
final ReaderContext context = new ReaderContext(swagger, cls, "", null, false, new ArrayList<>(),
... | java | public static void read(Swagger swagger, Set<Class<?>> classes) {
final SwaggerAnnotationsReader reader = new SwaggerAnnotationsReader(swagger);
for (Class<?> cls : classes) {
final ReaderContext context = new ReaderContext(swagger, cls, "", null, false, new ArrayList<>(),
... | [
"public",
"static",
"void",
"read",
"(",
"Swagger",
"swagger",
",",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"classes",
")",
"{",
"final",
"SwaggerAnnotationsReader",
"reader",
"=",
"new",
"SwaggerAnnotationsReader",
"(",
"swagger",
")",
";",
"for",
"(",
"... | Scans a set of classes for Swagger annotations.
@param swagger is the Swagger instance
@param classes are a set of classes to scan | [
"Scans",
"a",
"set",
"of",
"classes",
"for",
"Swagger",
"annotations",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/api/SwaggerAnnotationsReader.java#L65-L72 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/cloud/CloudClassLoader.java | CloudClassLoader.getResourceAsStream | @Override
public InputStream getResourceAsStream(String name) {
byte[] b = null;
try {
Asset resource = AssetCache.getAsset(mdwPackage.getName() + "/" + name);
if (resource != null)
b = resource.getRawContent();
if (b == null)
b = f... | java | @Override
public InputStream getResourceAsStream(String name) {
byte[] b = null;
try {
Asset resource = AssetCache.getAsset(mdwPackage.getName() + "/" + name);
if (resource != null)
b = resource.getRawContent();
if (b == null)
b = f... | [
"@",
"Override",
"public",
"InputStream",
"getResourceAsStream",
"(",
"String",
"name",
")",
"{",
"byte",
"[",
"]",
"b",
"=",
"null",
";",
"try",
"{",
"Asset",
"resource",
"=",
"AssetCache",
".",
"getAsset",
"(",
"mdwPackage",
".",
"getName",
"(",
")",
"... | This is used by XMLBeans for loading the type system. | [
"This",
"is",
"used",
"by",
"XMLBeans",
"for",
"loading",
"the",
"type",
"system",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cloud/CloudClassLoader.java#L306-L326 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/event/InternalEvent.java | InternalEvent.createEventParameters | private EventParameters createEventParameters(Map<String,String> pParams){
EventParameters evParams = EventParameters.Factory.newInstance();
for (String name : pParams.keySet()) {
String val = pParams.get(name);
if(val == null){
continue;
}
... | java | private EventParameters createEventParameters(Map<String,String> pParams){
EventParameters evParams = EventParameters.Factory.newInstance();
for (String name : pParams.keySet()) {
String val = pParams.get(name);
if(val == null){
continue;
}
... | [
"private",
"EventParameters",
"createEventParameters",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"pParams",
")",
"{",
"EventParameters",
"evParams",
"=",
"EventParameters",
".",
"Factory",
".",
"newInstance",
"(",
")",
";",
"for",
"(",
"String",
"name",
"... | Method that creates the event params based on the passed in Map
@param pParams
@return EventParameters | [
"Method",
"that",
"creates",
"the",
"event",
"params",
"based",
"on",
"the",
"passed",
"in",
"Map"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/event/InternalEvent.java#L104-L117 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/event/InternalEvent.java | InternalEvent.createActivityNotifyMessage | public static InternalEvent createActivityNotifyMessage(ActivityInstance ai,
Integer eventType, String masterRequestId, String compCode) {
InternalEvent event = new InternalEvent();
event.workId = ai.getActivityId();
event.transitionInstanceId = null;
event.eventType = eventT... | java | public static InternalEvent createActivityNotifyMessage(ActivityInstance ai,
Integer eventType, String masterRequestId, String compCode) {
InternalEvent event = new InternalEvent();
event.workId = ai.getActivityId();
event.transitionInstanceId = null;
event.eventType = eventT... | [
"public",
"static",
"InternalEvent",
"createActivityNotifyMessage",
"(",
"ActivityInstance",
"ai",
",",
"Integer",
"eventType",
",",
"String",
"masterRequestId",
",",
"String",
"compCode",
")",
"{",
"InternalEvent",
"event",
"=",
"new",
"InternalEvent",
"(",
")",
";... | create activity FINISH, ABORT, RESUME, CORRECT, ERROR and any event type that can be specified in
designer configuration for events.
@param ai
@param eventType
@param masterRequestId
@param compCode
@return | [
"create",
"activity",
"FINISH",
"ABORT",
"RESUME",
"CORRECT",
"ERROR",
"and",
"any",
"event",
"type",
"that",
"can",
"be",
"specified",
"in",
"designer",
"configuration",
"for",
"events",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/event/InternalEvent.java#L225-L237 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/TransactionUtil.java | TransactionUtil.getTransaction | public Transaction getTransaction() {
try {
return getTransactionManager().getTransaction();
}
catch (Exception ex) {
StandardLogger logger = LoggerUtil.getStandardLogger();
logger.severeException(ex.getMessage(), ex);
return null;
}
} | java | public Transaction getTransaction() {
try {
return getTransactionManager().getTransaction();
}
catch (Exception ex) {
StandardLogger logger = LoggerUtil.getStandardLogger();
logger.severeException(ex.getMessage(), ex);
return null;
}
} | [
"public",
"Transaction",
"getTransaction",
"(",
")",
"{",
"try",
"{",
"return",
"getTransactionManager",
"(",
")",
".",
"getTransaction",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"ex",
")",
"{",
"StandardLogger",
"logger",
"=",
"LoggerUtil",
".",
"getS... | Returns the current transaction | [
"Returns",
"the",
"current",
"transaction"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/TransactionUtil.java#L45-L54 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/TransactionUtil.java | TransactionUtil.getTransactionManager | public TransactionManager getTransactionManager() {
TransactionManager transMgr = null;
try {
String jndiName = ApplicationContext.getNamingProvider().getTransactionManagerName();
Object txMgr = ApplicationContext.getNamingProvider().lookup(null, jndiName, TransactionManager.clas... | java | public TransactionManager getTransactionManager() {
TransactionManager transMgr = null;
try {
String jndiName = ApplicationContext.getNamingProvider().getTransactionManagerName();
Object txMgr = ApplicationContext.getNamingProvider().lookup(null, jndiName, TransactionManager.clas... | [
"public",
"TransactionManager",
"getTransactionManager",
"(",
")",
"{",
"TransactionManager",
"transMgr",
"=",
"null",
";",
"try",
"{",
"String",
"jndiName",
"=",
"ApplicationContext",
".",
"getNamingProvider",
"(",
")",
".",
"getTransactionManagerName",
"(",
")",
"... | Returns transaction manager | [
"Returns",
"transaction",
"manager"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/TransactionUtil.java#L59-L70 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/user/User.java | User.belongsToGroup | public boolean belongsToGroup(String groupName) {
if (workgroups == null || workgroups.length == 0) {
return false;
}
for (Workgroup g : workgroups) {
if (g.getName().equals(groupName)) return true;
}
return false;
} | java | public boolean belongsToGroup(String groupName) {
if (workgroups == null || workgroups.length == 0) {
return false;
}
for (Workgroup g : workgroups) {
if (g.getName().equals(groupName)) return true;
}
return false;
} | [
"public",
"boolean",
"belongsToGroup",
"(",
"String",
"groupName",
")",
"{",
"if",
"(",
"workgroups",
"==",
"null",
"||",
"workgroups",
".",
"length",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"Workgroup",
"g",
":",
"workgroups",
")",... | Check whether user belongs to the specified group | [
"Check",
"whether",
"user",
"belongs",
"to",
"the",
"specified",
"group"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/user/User.java#L239-L247 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/user/User.java | User.addRoleForGroup | public void addRoleForGroup(String groupName, String roleName) {
if (workgroups==null) {
workgroups = new Workgroup[1];
workgroups[0] = new Workgroup(null, groupName, null);
}
List<String> roles = workgroups[0].getRoles();
if (roles==null) {
roles = ne... | java | public void addRoleForGroup(String groupName, String roleName) {
if (workgroups==null) {
workgroups = new Workgroup[1];
workgroups[0] = new Workgroup(null, groupName, null);
}
List<String> roles = workgroups[0].getRoles();
if (roles==null) {
roles = ne... | [
"public",
"void",
"addRoleForGroup",
"(",
"String",
"groupName",
",",
"String",
"roleName",
")",
"{",
"if",
"(",
"workgroups",
"==",
"null",
")",
"{",
"workgroups",
"=",
"new",
"Workgroup",
"[",
"1",
"]",
";",
"workgroups",
"[",
"0",
"]",
"=",
"new",
"... | This is only used when UserVO is a member of UserGroupVO.
Only that group is populated as a substructure to store roles.
@param groupId
@param roleName | [
"This",
"is",
"only",
"used",
"when",
"UserVO",
"is",
"a",
"member",
"of",
"UserGroupVO",
".",
"Only",
"that",
"group",
"is",
"populated",
"as",
"a",
"substructure",
"to",
"store",
"roles",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/user/User.java#L289-L300 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/user/User.java | User.parseName | public void parseName() {
if (getName() != null) {
String name = getName().trim();
int firstSp = name.indexOf(' ');
if (firstSp > 0) {
setFirst(name.substring(0, firstSp));
int lastSp = name.lastIndexOf(' ');
setLast(name.substr... | java | public void parseName() {
if (getName() != null) {
String name = getName().trim();
int firstSp = name.indexOf(' ');
if (firstSp > 0) {
setFirst(name.substring(0, firstSp));
int lastSp = name.lastIndexOf(' ');
setLast(name.substr... | [
"public",
"void",
"parseName",
"(",
")",
"{",
"if",
"(",
"getName",
"(",
")",
"!=",
"null",
")",
"{",
"String",
"name",
"=",
"getName",
"(",
")",
".",
"trim",
"(",
")",
";",
"int",
"firstSp",
"=",
"name",
".",
"indexOf",
"(",
"'",
"'",
")",
";"... | Set first and last name based on full name. | [
"Set",
"first",
"and",
"last",
"name",
"based",
"on",
"full",
"name",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/user/User.java#L403-L416 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java | SoccomClient.putreq | public void putreq(String msg)
throws SoccomException
{
byte msgbytes[] = SoccomMessage.makeMessage(msg, null);
logline("SEND: " + new String(msgbytes));
copy_msgid(_msgid, msgbytes);
try {
// _out.print(msg);
_out.write(msgbytes);
} catch (IOException e) {
throw new ... | java | public void putreq(String msg)
throws SoccomException
{
byte msgbytes[] = SoccomMessage.makeMessage(msg, null);
logline("SEND: " + new String(msgbytes));
copy_msgid(_msgid, msgbytes);
try {
// _out.print(msg);
_out.write(msgbytes);
} catch (IOException e) {
throw new ... | [
"public",
"void",
"putreq",
"(",
"String",
"msg",
")",
"throws",
"SoccomException",
"{",
"byte",
"msgbytes",
"[",
"]",
"=",
"SoccomMessage",
".",
"makeMessage",
"(",
"msg",
",",
"null",
")",
";",
"logline",
"(",
"\"SEND: \"",
"+",
"new",
"String",
"(",
"... | Send a request message.
@param msg The message to be sent.
@exception SoccomException Thrown when an IOException is encountered. | [
"Send",
"a",
"request",
"message",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java#L153-L165 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java | SoccomClient.putreq_vheader | public void putreq_vheader(String endmark)
throws SoccomException
{
if (endmark.length()!=4)
throw new SoccomException(SoccomException.ENDM_LENGTH);
byte msgbytes[] = SoccomMessage.
makeMessageSpecial("ENDM" + endmark, null);
logline("SEND: " + new String(msgbytes));
copy_msgid(_... | java | public void putreq_vheader(String endmark)
throws SoccomException
{
if (endmark.length()!=4)
throw new SoccomException(SoccomException.ENDM_LENGTH);
byte msgbytes[] = SoccomMessage.
makeMessageSpecial("ENDM" + endmark, null);
logline("SEND: " + new String(msgbytes));
copy_msgid(_... | [
"public",
"void",
"putreq_vheader",
"(",
"String",
"endmark",
")",
"throws",
"SoccomException",
"{",
"if",
"(",
"endmark",
".",
"length",
"(",
")",
"!=",
"4",
")",
"throw",
"new",
"SoccomException",
"(",
"SoccomException",
".",
"ENDM_LENGTH",
")",
";",
"byte... | Send the header part of a variable-size request message.
@param endmark Must be a four character string that will
not appear at the beginning of a line in message body.
@exception SoccomException Thrown when an IOException is encountered. | [
"Send",
"the",
"header",
"part",
"of",
"a",
"variable",
"-",
"size",
"request",
"message",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java#L173-L187 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java | SoccomClient.putreq_vline | public void putreq_vline(String msg)
throws SoccomException
{
int length = msg.length();
if (msg.charAt(length-1) == '\n') {
logline("SEND: " + msg.substring(0,length-1));
} else {
logline("SEND: " + msg);
msg += "\n";
}
byte msgbytes[] = msg.getBytes();
try {
... | java | public void putreq_vline(String msg)
throws SoccomException
{
int length = msg.length();
if (msg.charAt(length-1) == '\n') {
logline("SEND: " + msg.substring(0,length-1));
} else {
logline("SEND: " + msg);
msg += "\n";
}
byte msgbytes[] = msg.getBytes();
try {
... | [
"public",
"void",
"putreq_vline",
"(",
"String",
"msg",
")",
"throws",
"SoccomException",
"{",
"int",
"length",
"=",
"msg",
".",
"length",
"(",
")",
";",
"if",
"(",
"msg",
".",
"charAt",
"(",
"length",
"-",
"1",
")",
"==",
"'",
"'",
")",
"{",
"logl... | Send a line as a part of a variable-size request message.
@param msg A line of message. If it is not ended with a new
line character, add it.
@exception SoccomException Thrown when an IOException is encountered. | [
"Send",
"a",
"line",
"as",
"a",
"part",
"of",
"a",
"variable",
"-",
"size",
"request",
"message",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java#L195-L211 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java | SoccomClient.putreq_vfooter | public void putreq_vfooter(String endmark)
throws SoccomException
{
if (endmark.length()!=4)
throw new SoccomException(SoccomException.ENDM_LENGTH);
String msg = endmark + "\n";
byte msgbytes[] = msg.getBytes();
logline("SEND: " + endmark);
try {
_out.write(msgbytes);
} c... | java | public void putreq_vfooter(String endmark)
throws SoccomException
{
if (endmark.length()!=4)
throw new SoccomException(SoccomException.ENDM_LENGTH);
String msg = endmark + "\n";
byte msgbytes[] = msg.getBytes();
logline("SEND: " + endmark);
try {
_out.write(msgbytes);
} c... | [
"public",
"void",
"putreq_vfooter",
"(",
"String",
"endmark",
")",
"throws",
"SoccomException",
"{",
"if",
"(",
"endmark",
".",
"length",
"(",
")",
"!=",
"4",
")",
"throw",
"new",
"SoccomException",
"(",
"SoccomException",
".",
"ENDM_LENGTH",
")",
";",
"Stri... | Mark the end of a variable-size message.
@param endmark This must be the same one as used in the putreq_vheader.
@exception SoccomException Thrown when an IOException is encountered. | [
"Mark",
"the",
"end",
"of",
"a",
"variable",
"-",
"size",
"message",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java#L218-L231 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java | SoccomClient.getresp | public String getresp(int timeout)
throws SoccomException
{
int size, n;
String sizestr;
try {
byte[] _header = new byte[SoccomMessage.HEADER_SIZE];
_socket.setSoTimeout(timeout*1000);
n = _in.read(_header, 0, SoccomMessage.HEADER_SIZE);
if (n!=SoccomMessage.HEADER_SI... | java | public String getresp(int timeout)
throws SoccomException
{
int size, n;
String sizestr;
try {
byte[] _header = new byte[SoccomMessage.HEADER_SIZE];
_socket.setSoTimeout(timeout*1000);
n = _in.read(_header, 0, SoccomMessage.HEADER_SIZE);
if (n!=SoccomMessage.HEADER_SI... | [
"public",
"String",
"getresp",
"(",
"int",
"timeout",
")",
"throws",
"SoccomException",
"{",
"int",
"size",
",",
"n",
";",
"String",
"sizestr",
";",
"try",
"{",
"byte",
"[",
"]",
"_header",
"=",
"new",
"byte",
"[",
"SoccomMessage",
".",
"HEADER_SIZE",
"]... | Get the response from the server, after sending a request.
@param timeout timeout value in seconds
@return The response message.
@exception SoccomException Thrown when an IOException is encountered. | [
"Get",
"the",
"response",
"from",
"the",
"server",
"after",
"sending",
"a",
"request",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java#L239-L295 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java | SoccomClient.getresp_first | public String getresp_first(int maxbytes, int timeout)
throws SoccomException
{
int n;
String sizestr, msg;
_resp_read = -1;
try {
byte[] _header = new byte[SoccomMessage.HEADER_SIZE];
_socket.setSoTimeout(timeout*1000);
n = _in.read(_header, 0, SoccomMessage.HEADER_SIZE)... | java | public String getresp_first(int maxbytes, int timeout)
throws SoccomException
{
int n;
String sizestr, msg;
_resp_read = -1;
try {
byte[] _header = new byte[SoccomMessage.HEADER_SIZE];
_socket.setSoTimeout(timeout*1000);
n = _in.read(_header, 0, SoccomMessage.HEADER_SIZE)... | [
"public",
"String",
"getresp_first",
"(",
"int",
"maxbytes",
",",
"int",
"timeout",
")",
"throws",
"SoccomException",
"{",
"int",
"n",
";",
"String",
"sizestr",
",",
"msg",
";",
"_resp_read",
"=",
"-",
"1",
";",
"try",
"{",
"byte",
"[",
"]",
"_header",
... | The method receives the first part of response message from the
server, up to maxbytes bytes.
Use getresp_hasmore and getresp_next to get
getresp_rest to get the remaining part of messages.
When the server sends the message using ENDM, the string returned
may be longer than maxbytes, but only till the first line after ... | [
"The",
"method",
"receives",
"the",
"first",
"part",
"of",
"response",
"message",
"from",
"the",
"server",
"up",
"to",
"maxbytes",
"bytes",
".",
"Use",
"getresp_hasmore",
"and",
"getresp_next",
"to",
"get",
"getresp_rest",
"to",
"get",
"the",
"remaining",
"par... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java#L323-L390 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java | SoccomClient.close | public void close()
{
if (_socket!=null) {
try {
_socket.close();
_socket = null;
} catch (IOException e) {
System.err.println("Exception: " + e);
// throw new SoccomException(SoccomException.RECV_ERROR);
}
_in = null;
_out = null;
}
... | java | public void close()
{
if (_socket!=null) {
try {
_socket.close();
_socket = null;
} catch (IOException e) {
System.err.println("Exception: " + e);
// throw new SoccomException(SoccomException.RECV_ERROR);
}
_in = null;
_out = null;
}
... | [
"public",
"void",
"close",
"(",
")",
"{",
"if",
"(",
"_socket",
"!=",
"null",
")",
"{",
"try",
"{",
"_socket",
".",
"close",
"(",
")",
";",
"_socket",
"=",
"null",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"System",
".",
"err",
".",
... | Close the connection.
This is automatically called at garbage collection but
it is a good idea to voluntarily call it as soon as the connection
is not needed any more. | [
"Close",
"the",
"connection",
".",
"This",
"is",
"automatically",
"called",
"at",
"garbage",
"collection",
"but",
"it",
"is",
"a",
"good",
"idea",
"to",
"voluntarily",
"call",
"it",
"as",
"soon",
"as",
"the",
"connection",
"is",
"not",
"needed",
"any",
"mo... | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java#L579-L592 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/handler/ServiceRequestHandler.java | ServiceRequestHandler.getServiceInstance | protected TextService getServiceInstance(Map<String,String> headers) throws ServiceException {
try {
String requestPath = headers.get(Listener.METAINFO_REQUEST_PATH);
String[] pathSegments = requestPath != null ? requestPath.split("/") : null;
if (pathSegments == null)
... | java | protected TextService getServiceInstance(Map<String,String> headers) throws ServiceException {
try {
String requestPath = headers.get(Listener.METAINFO_REQUEST_PATH);
String[] pathSegments = requestPath != null ? requestPath.split("/") : null;
if (pathSegments == null)
... | [
"protected",
"TextService",
"getServiceInstance",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"throws",
"ServiceException",
"{",
"try",
"{",
"String",
"requestPath",
"=",
"headers",
".",
"get",
"(",
"Listener",
".",
"METAINFO_REQUEST_PATH",
")... | Returns the service instance, consulting the service registry if necessary. | [
"Returns",
"the",
"service",
"instance",
"consulting",
"the",
"service",
"registry",
"if",
"necessary",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/handler/ServiceRequestHandler.java#L191-L239 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/handler/ServiceRequestHandler.java | ServiceRequestHandler.getFormat | protected Format getFormat(Map<String,String> metaInfo) {
Format format = Format.json;
metaInfo.put(Listener.METAINFO_CONTENT_TYPE, Listener.CONTENT_TYPE_JSON);
String formatParam = (String) metaInfo.get("format");
if (formatParam != null) {
if (formatParam.equals("xml")) {
... | java | protected Format getFormat(Map<String,String> metaInfo) {
Format format = Format.json;
metaInfo.put(Listener.METAINFO_CONTENT_TYPE, Listener.CONTENT_TYPE_JSON);
String formatParam = (String) metaInfo.get("format");
if (formatParam != null) {
if (formatParam.equals("xml")) {
... | [
"protected",
"Format",
"getFormat",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"metaInfo",
")",
"{",
"Format",
"format",
"=",
"Format",
".",
"json",
";",
"metaInfo",
".",
"put",
"(",
"Listener",
".",
"METAINFO_CONTENT_TYPE",
",",
"Listener",
".",
"CONT... | Default format is now JSON. | [
"Default",
"format",
"is",
"now",
"JSON",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/handler/ServiceRequestHandler.java#L244-L269 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/Attributes.java | Attributes.get | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Retrieve attributes for an ownerType and ownerId",
notes="Response is a generic JSON object with names/values.")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
Map<String,S... | java | @Override
@Path("/{ownerType}/{ownerId}")
@ApiOperation(value="Retrieve attributes for an ownerType and ownerId",
notes="Response is a generic JSON object with names/values.")
public JSONObject get(String path, Map<String,String> headers) throws ServiceException, JSONException {
Map<String,S... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{ownerType}/{ownerId}\"",
")",
"@",
"ApiOperation",
"(",
"value",
"=",
"\"Retrieve attributes for an ownerType and ownerId\"",
",",
"notes",
"=",
"\"Response is a generic JSON object with names/values.\"",
")",
"public",
"JSONObject",
"g... | Retrieve attributes. | [
"Retrieve",
"attributes",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Attributes.java#L54-L81 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/cli/Import.java | Import.importAssetsFromGit | public void importAssetsFromGit(ProgressMonitor... monitors) throws IOException {
if (inProgress)
throw new IOException("Asset import already in progress...");
try {
inProgress = true;
getOut().println("Importing from Git into: " + getProjectDir() + "...(branch: " +... | java | public void importAssetsFromGit(ProgressMonitor... monitors) throws IOException {
if (inProgress)
throw new IOException("Asset import already in progress...");
try {
inProgress = true;
getOut().println("Importing from Git into: " + getProjectDir() + "...(branch: " +... | [
"public",
"void",
"importAssetsFromGit",
"(",
"ProgressMonitor",
"...",
"monitors",
")",
"throws",
"IOException",
"{",
"if",
"(",
"inProgress",
")",
"throw",
"new",
"IOException",
"(",
"\"Asset import already in progress...\"",
")",
";",
"try",
"{",
"inProgress",
"=... | This is for importing project assets from Git into an environment. | [
"This",
"is",
"for",
"importing",
"project",
"assets",
"from",
"Git",
"into",
"an",
"environment",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Import.java#L209-L254 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/cli/Import.java | Import.importGit | public void importGit(ProgressMonitor... monitors) throws IOException {
if (inProgress)
throw new IOException("Asset already in progress...");
try {
inProgress = true;
Props props = new Props(this);
VcInfo vcInfo = new VcInfo(getGitRoot(), props);
... | java | public void importGit(ProgressMonitor... monitors) throws IOException {
if (inProgress)
throw new IOException("Asset already in progress...");
try {
inProgress = true;
Props props = new Props(this);
VcInfo vcInfo = new VcInfo(getGitRoot(), props);
... | [
"public",
"void",
"importGit",
"(",
"ProgressMonitor",
"...",
"monitors",
")",
"throws",
"IOException",
"{",
"if",
"(",
"inProgress",
")",
"throw",
"new",
"IOException",
"(",
"\"Asset already in progress...\"",
")",
";",
"try",
"{",
"inProgress",
"=",
"true",
";... | This is for importing newly-discovered assets. | [
"This",
"is",
"for",
"importing",
"newly",
"-",
"discovered",
"assets",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cli/Import.java#L259-L308 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/common/service/ServiceRegistry.java | ServiceRegistry.getDynamicService | public <T extends RegisteredService> T getDynamicService(Package pkg, Class<T> serviceInterface, String className) {
if (dynamicServices.containsKey(serviceInterface.getName())
&& dynamicServices.get(serviceInterface.getName()).contains(className)) {
try {
ClassLoader... | java | public <T extends RegisteredService> T getDynamicService(Package pkg, Class<T> serviceInterface, String className) {
if (dynamicServices.containsKey(serviceInterface.getName())
&& dynamicServices.get(serviceInterface.getName()).contains(className)) {
try {
ClassLoader... | [
"public",
"<",
"T",
"extends",
"RegisteredService",
">",
"T",
"getDynamicService",
"(",
"Package",
"pkg",
",",
"Class",
"<",
"T",
">",
"serviceInterface",
",",
"String",
"className",
")",
"{",
"if",
"(",
"dynamicServices",
".",
"containsKey",
"(",
"serviceInte... | Get the Dynamic java instance for Registered Service | [
"Get",
"the",
"Dynamic",
"java",
"instance",
"for",
"Registered",
"Service"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/service/ServiceRegistry.java#L55-L72 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/common/service/ServiceRegistry.java | ServiceRegistry.addDynamicService | public void addDynamicService(String serviceInterface, String className) {
if (dynamicServices.containsKey(serviceInterface)) {
dynamicServices.get(serviceInterface).add(className);
}
else {
Set<String> classNamesSet = new HashSet<String>();
classNamesSet.add(... | java | public void addDynamicService(String serviceInterface, String className) {
if (dynamicServices.containsKey(serviceInterface)) {
dynamicServices.get(serviceInterface).add(className);
}
else {
Set<String> classNamesSet = new HashSet<String>();
classNamesSet.add(... | [
"public",
"void",
"addDynamicService",
"(",
"String",
"serviceInterface",
",",
"String",
"className",
")",
"{",
"if",
"(",
"dynamicServices",
".",
"containsKey",
"(",
"serviceInterface",
")",
")",
"{",
"dynamicServices",
".",
"get",
"(",
"serviceInterface",
")",
... | Add Dynamic Java Registered Service class names for each service
@param serviceInterface
@param className | [
"Add",
"Dynamic",
"Java",
"Registered",
"Service",
"class",
"names",
"for",
"each",
"service"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/service/ServiceRegistry.java#L140-L149 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/common/service/Query.java | Query.getArrayFilter | public String[] getArrayFilter(String key) {
String value = filters.get(key);
if (value == null)
return null;
String[] array = new String[0];
if (value.startsWith("[")) {
if (value.length() > 2)
array = value.substring(1, value.length() - 1).split(... | java | public String[] getArrayFilter(String key) {
String value = filters.get(key);
if (value == null)
return null;
String[] array = new String[0];
if (value.startsWith("[")) {
if (value.length() > 2)
array = value.substring(1, value.length() - 1).split(... | [
"public",
"String",
"[",
"]",
"getArrayFilter",
"(",
"String",
"key",
")",
"{",
"String",
"value",
"=",
"filters",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"return",
"null",
";",
"String",
"[",
"]",
"array",
"=",
"ne... | Empty list returns null; | [
"Empty",
"list",
"returns",
"null",
";"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/service/Query.java#L128-L146 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/common/service/Query.java | Query.getMapFilter | public Map<String,String> getMapFilter(String name) {
String value = filters.get(name);
if (value == null)
return null;
Map<String,String> map = new LinkedHashMap<>();
if (value.startsWith("{") && value.endsWith("}")) {
for (String entry : value.substring(1, value... | java | public Map<String,String> getMapFilter(String name) {
String value = filters.get(name);
if (value == null)
return null;
Map<String,String> map = new LinkedHashMap<>();
if (value.startsWith("{") && value.endsWith("}")) {
for (String entry : value.substring(1, value... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getMapFilter",
"(",
"String",
"name",
")",
"{",
"String",
"value",
"=",
"filters",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"return",
"null",
";",
"Map",
"<",
"St... | Empty map returns null, as does invalid format. | [
"Empty",
"map",
"returns",
"null",
"as",
"does",
"invalid",
"format",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/common/service/Query.java#L167-L189 | train |
CenturyLinkCloud/mdw | mdw-workflow/assets/com/centurylink/mdw/microservice/MicroserviceAccess.java | MicroserviceAccess.getServiceSummaryVariableName | public String getServiceSummaryVariableName(Process processDefinition) {
for (Activity activity : processDefinition.getActivities()) {
String attr = activity.getAttribute("serviceSummaryVariable");
if (attr != null)
return attr;
}
return null;
} | java | public String getServiceSummaryVariableName(Process processDefinition) {
for (Activity activity : processDefinition.getActivities()) {
String attr = activity.getAttribute("serviceSummaryVariable");
if (attr != null)
return attr;
}
return null;
} | [
"public",
"String",
"getServiceSummaryVariableName",
"(",
"Process",
"processDefinition",
")",
"{",
"for",
"(",
"Activity",
"activity",
":",
"processDefinition",
".",
"getActivities",
"(",
")",
")",
"{",
"String",
"attr",
"=",
"activity",
".",
"getAttribute",
"(",... | Walks through all activities looking for the attribute. | [
"Walks",
"through",
"all",
"activities",
"looking",
"for",
"the",
"attribute",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/microservice/MicroserviceAccess.java#L84-L91 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/workflow/Transition.java | Transition.getJson | public JSONObject getJson() throws JSONException {
JSONObject json = create();
json.put("id", getLogicalId());
json.put("to", "A" + toId);
if (completionCode != null)
json.put("resultCode", completionCode);
if (eventType != null)
json.put("event", EventTyp... | java | public JSONObject getJson() throws JSONException {
JSONObject json = create();
json.put("id", getLogicalId());
json.put("to", "A" + toId);
if (completionCode != null)
json.put("resultCode", completionCode);
if (eventType != null)
json.put("event", EventTyp... | [
"public",
"JSONObject",
"getJson",
"(",
")",
"throws",
"JSONException",
"{",
"JSONObject",
"json",
"=",
"create",
"(",
")",
";",
"json",
".",
"put",
"(",
"\"id\"",
",",
"getLogicalId",
"(",
")",
")",
";",
"json",
".",
"put",
"(",
"\"to\"",
",",
"\"A\""... | Does not populate from field since JSON transitions are children of activities. | [
"Does",
"not",
"populate",
"from",
"field",
"since",
"JSON",
"transitions",
"are",
"children",
"of",
"activities",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/workflow/Transition.java#L231-L242 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/java/CompiledJavaCache.java | CompiledJavaCache.initializeJavaSourceArtifacts | private static void initializeJavaSourceArtifacts() throws DataAccessException, IOException, CachingException {
logger.info("Initializing Java source assets...");
long before = System.currentTimeMillis();
for (Asset javaSource : AssetCache.getAssets(Asset.JAVA)) {
Package pkg = Pack... | java | private static void initializeJavaSourceArtifacts() throws DataAccessException, IOException, CachingException {
logger.info("Initializing Java source assets...");
long before = System.currentTimeMillis();
for (Asset javaSource : AssetCache.getAssets(Asset.JAVA)) {
Package pkg = Pack... | [
"private",
"static",
"void",
"initializeJavaSourceArtifacts",
"(",
")",
"throws",
"DataAccessException",
",",
"IOException",
",",
"CachingException",
"{",
"logger",
".",
"info",
"(",
"\"Initializing Java source assets...\"",
")",
";",
"long",
"before",
"=",
"System",
... | Writes the java-language assets into the temporary directory.
This is only needed for compilation dependencies. | [
"Writes",
"the",
"java",
"-",
"language",
"assets",
"into",
"the",
"temporary",
"directory",
".",
"This",
"is",
"only",
"needed",
"for",
"compilation",
"dependencies",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/java/CompiledJavaCache.java#L512-L535 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/java/CompiledJavaCache.java | CompiledJavaCache.preCompileJavaSourceArtifacts | private static void preCompileJavaSourceArtifacts() {
if (preCompiled != null) {
for (String preCompClass : preCompiled) {
logger.info("Precompiling dynamic Java asset class: " + preCompClass);
try {
Asset javaAsset = AssetCache.getAsset(preCompCla... | java | private static void preCompileJavaSourceArtifacts() {
if (preCompiled != null) {
for (String preCompClass : preCompiled) {
logger.info("Precompiling dynamic Java asset class: " + preCompClass);
try {
Asset javaAsset = AssetCache.getAsset(preCompCla... | [
"private",
"static",
"void",
"preCompileJavaSourceArtifacts",
"(",
")",
"{",
"if",
"(",
"preCompiled",
"!=",
"null",
")",
"{",
"for",
"(",
"String",
"preCompClass",
":",
"preCompiled",
")",
"{",
"logger",
".",
"info",
"(",
"\"Precompiling dynamic Java asset class:... | Precompile designated Java Source artifacts. | [
"Precompile",
"designated",
"Java",
"Source",
"artifacts",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/java/CompiledJavaCache.java#L540-L557 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/monitor/ServiceLevelAgreement.java | ServiceLevelAgreement.unitsToSeconds | public static int unitsToSeconds(String interval, String unit) {
if (interval == null || interval.isEmpty()) return 0;
else if (unit == null) return (int)(Double.parseDouble(interval));
else if (unit.equals(INTERVAL_DAYS)) return (int)(Double.parseDouble(interval)*86400);
else if (unit.equal... | java | public static int unitsToSeconds(String interval, String unit) {
if (interval == null || interval.isEmpty()) return 0;
else if (unit == null) return (int)(Double.parseDouble(interval));
else if (unit.equals(INTERVAL_DAYS)) return (int)(Double.parseDouble(interval)*86400);
else if (unit.equal... | [
"public",
"static",
"int",
"unitsToSeconds",
"(",
"String",
"interval",
",",
"String",
"unit",
")",
"{",
"if",
"(",
"interval",
"==",
"null",
"||",
"interval",
".",
"isEmpty",
"(",
")",
")",
"return",
"0",
";",
"else",
"if",
"(",
"unit",
"==",
"null",
... | Convert interval of specified unit to seconds
@param interval
@param unit
@return | [
"Convert",
"interval",
"of",
"specified",
"unit",
"to",
"seconds"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/monitor/ServiceLevelAgreement.java#L68-L75 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/model/monitor/ServiceLevelAgreement.java | ServiceLevelAgreement.secondsToUnits | public static String secondsToUnits(int seconds, String unit) {
if (unit == null) return String.valueOf(seconds);
else if (unit.equals(INTERVAL_DAYS)) return String.valueOf(Math.round(seconds/86400));
else if (unit.equals(INTERVAL_HOURS)) return String.valueOf(Math.round(seconds/3600));
else... | java | public static String secondsToUnits(int seconds, String unit) {
if (unit == null) return String.valueOf(seconds);
else if (unit.equals(INTERVAL_DAYS)) return String.valueOf(Math.round(seconds/86400));
else if (unit.equals(INTERVAL_HOURS)) return String.valueOf(Math.round(seconds/3600));
else... | [
"public",
"static",
"String",
"secondsToUnits",
"(",
"int",
"seconds",
",",
"String",
"unit",
")",
"{",
"if",
"(",
"unit",
"==",
"null",
")",
"return",
"String",
".",
"valueOf",
"(",
"seconds",
")",
";",
"else",
"if",
"(",
"unit",
".",
"equals",
"(",
... | Convert seconds to specified units
@param seconds
@param unit
@return | [
"Convert",
"seconds",
"to",
"specified",
"units"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/monitor/ServiceLevelAgreement.java#L83-L89 | train |
CenturyLinkCloud/mdw | mdw-hub/src/com/centurylink/mdw/hub/context/Page.java | Page.getAssetPath | @SuppressWarnings("unused")
public String getAssetPath() {
String relPath = getRelPath();
return relPath.substring(0, relPath.length() - getAsset().getName().length() - 1).replace('/', '.')
+ "/" + getAsset().getName();
} | java | @SuppressWarnings("unused")
public String getAssetPath() {
String relPath = getRelPath();
return relPath.substring(0, relPath.length() - getAsset().getName().length() - 1).replace('/', '.')
+ "/" + getAsset().getName();
} | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"public",
"String",
"getAssetPath",
"(",
")",
"{",
"String",
"relPath",
"=",
"getRelPath",
"(",
")",
";",
"return",
"relPath",
".",
"substring",
"(",
"0",
",",
"relPath",
".",
"length",
"(",
")",
"-",
"get... | Accessed in react default index.html substitution. | [
"Accessed",
"in",
"react",
"default",
"index",
".",
"html",
"substitution",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-hub/src/com/centurylink/mdw/hub/context/Page.java#L51-L56 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/service/rest/DocumentValues.java | DocumentValues.get | @Override
@Path("/{documentId}")
public JSONObject get(String path, Map<String,String> headers)
throws ServiceException, JSONException {
WorkflowServices workflowServices = ServiceLocator.getWorkflowServices();
String docId = getSegment(path, 1);
if (docId == null) {
thro... | java | @Override
@Path("/{documentId}")
public JSONObject get(String path, Map<String,String> headers)
throws ServiceException, JSONException {
WorkflowServices workflowServices = ServiceLocator.getWorkflowServices();
String docId = getSegment(path, 1);
if (docId == null) {
thro... | [
"@",
"Override",
"@",
"Path",
"(",
"\"/{documentId}\"",
")",
"public",
"JSONObject",
"get",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"throws",
"ServiceException",
",",
"JSONException",
"{",
"WorkflowServices",
"work... | Retrieve a document string value | [
"Retrieve",
"a",
"document",
"string",
"value"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/DocumentValues.java#L45-L62 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/rest/RestService.java | RestService.getRequestUrl | protected URL getRequestUrl(Map<String,String> headers) throws ServiceException {
String requestUrl = headers.get(Listener.METAINFO_REQUEST_URL);
if (requestUrl == null)
throw new ServiceException("Missing header: " + Listener.METAINFO_REQUEST_URL);
String queryStr = "";
if (... | java | protected URL getRequestUrl(Map<String,String> headers) throws ServiceException {
String requestUrl = headers.get(Listener.METAINFO_REQUEST_URL);
if (requestUrl == null)
throw new ServiceException("Missing header: " + Listener.METAINFO_REQUEST_URL);
String queryStr = "";
if (... | [
"protected",
"URL",
"getRequestUrl",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"throws",
"ServiceException",
"{",
"String",
"requestUrl",
"=",
"headers",
".",
"get",
"(",
"Listener",
".",
"METAINFO_REQUEST_URL",
")",
";",
"if",
"(",
"req... | Includes query string. | [
"Includes",
"query",
"string",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/rest/RestService.java#L137-L150 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/rest/RestService.java | RestService.getUserAction | protected UserAction getUserAction(User user, String path, Object content, Map<String,String> headers) {
Action action = getAction(path, content, headers);
Entity entity = getEntity(path, content, headers);
Long entityId = getEntityId(path, content, headers);
String descrip = getEntityDe... | java | protected UserAction getUserAction(User user, String path, Object content, Map<String,String> headers) {
Action action = getAction(path, content, headers);
Entity entity = getEntity(path, content, headers);
Long entityId = getEntityId(path, content, headers);
String descrip = getEntityDe... | [
"protected",
"UserAction",
"getUserAction",
"(",
"User",
"user",
",",
"String",
"path",
",",
"Object",
"content",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"Action",
"action",
"=",
"getAction",
"(",
"path",
",",
"content",
",",
... | For audit logging. | [
"For",
"audit",
"logging",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/rest/RestService.java#L164-L174 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/rest/RestService.java | RestService.getEntityId | protected Long getEntityId(String path, Object content, Map<String,String> headers) {
return 0L;
} | java | protected Long getEntityId(String path, Object content, Map<String,String> headers) {
return 0L;
} | [
"protected",
"Long",
"getEntityId",
"(",
"String",
"path",
",",
"Object",
"content",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"return",
"0L",
";",
"}"
] | Override if entity has a meaningful ID. | [
"Override",
"if",
"entity",
"has",
"a",
"meaningful",
"ID",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/rest/RestService.java#L183-L185 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/rest/RestService.java | RestService.getSub | protected String getSub(String path) {
int slash = path.indexOf('/');
if (slash > 0 && slash < path.length() - 1) // the first part of the path is what got us here
return path.substring(slash + 1);
else
return null;
} | java | protected String getSub(String path) {
int slash = path.indexOf('/');
if (slash > 0 && slash < path.length() - 1) // the first part of the path is what got us here
return path.substring(slash + 1);
else
return null;
} | [
"protected",
"String",
"getSub",
"(",
"String",
"path",
")",
"{",
"int",
"slash",
"=",
"path",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"slash",
">",
"0",
"&&",
"slash",
"<",
"path",
".",
"length",
"(",
")",
"-",
"1",
")",
"// the firs... | Minus the base path that triggered this service. | [
"Minus",
"the",
"base",
"path",
"that",
"triggered",
"this",
"service",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/rest/RestService.java#L237-L243 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/rest/RestService.java | RestService.getEntity | protected Entity getEntity(String path, Object content, Map<String,String> headers) {
return Entity.Other;
} | java | protected Entity getEntity(String path, Object content, Map<String,String> headers) {
return Entity.Other;
} | [
"protected",
"Entity",
"getEntity",
"(",
"String",
"path",
",",
"Object",
"content",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"return",
"Entity",
".",
"Other",
";",
"}"
] | Should be overridden. Avoid using Entity.Other. | [
"Should",
"be",
"overridden",
".",
"Avoid",
"using",
"Entity",
".",
"Other",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/rest/RestService.java#L252-L254 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/rest/RestService.java | RestService.getAuthUser | protected String getAuthUser(Map<String,String> headers) {
return headers.get(Listener.AUTHENTICATED_USER_HEADER);
} | java | protected String getAuthUser(Map<String,String> headers) {
return headers.get(Listener.AUTHENTICATED_USER_HEADER);
} | [
"protected",
"String",
"getAuthUser",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"return",
"headers",
".",
"get",
"(",
"Listener",
".",
"AUTHENTICATED_USER_HEADER",
")",
";",
"}"
] | returns authenticated user cuid | [
"returns",
"authenticated",
"user",
"cuid"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/rest/RestService.java#L261-L263 | train |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/rest/RestService.java | RestService.authorizeExport | protected void authorizeExport(Map<String,String> headers) throws AuthorizationException {
String path = headers.get(Listener.METAINFO_REQUEST_PATH);
User user = authorize(path, new JsonObject(), headers);
Action action = Action.Export;
Entity entity = getEntity(path, null, headers);
... | java | protected void authorizeExport(Map<String,String> headers) throws AuthorizationException {
String path = headers.get(Listener.METAINFO_REQUEST_PATH);
User user = authorize(path, new JsonObject(), headers);
Action action = Action.Export;
Entity entity = getEntity(path, null, headers);
... | [
"protected",
"void",
"authorizeExport",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"throws",
"AuthorizationException",
"{",
"String",
"path",
"=",
"headers",
".",
"get",
"(",
"Listener",
".",
"METAINFO_REQUEST_PATH",
")",
";",
"User",
"user... | Also audit logs. | [
"Also",
"audit",
"logs",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/rest/RestService.java#L268-L280 | train |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/rest/RestServiceAdapter.java | RestServiceAdapter.getRequestHeaders | public Map<String,String> getRequestHeaders() {
// If we already set the headers when logging request metadata, use them
if (super.getRequestHeaders() != null)
return super.getRequestHeaders();
try {
Map<String,String> headers = null;
String headersVar = get... | java | public Map<String,String> getRequestHeaders() {
// If we already set the headers when logging request metadata, use them
if (super.getRequestHeaders() != null)
return super.getRequestHeaders();
try {
Map<String,String> headers = null;
String headersVar = get... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getRequestHeaders",
"(",
")",
"{",
"// If we already set the headers when logging request metadata, use them",
"if",
"(",
"super",
".",
"getRequestHeaders",
"(",
")",
"!=",
"null",
")",
"return",
"super",
".",
"ge... | Override to specify HTTP request headers. | [
"Override",
"to",
"specify",
"HTTP",
"request",
"headers",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/rest/RestServiceAdapter.java#L337-L385 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/config/PropertyManager.java | PropertyManager.getConfigLocation | public static String getConfigLocation() {
if (configLocation == null) {
String configLoc = System.getProperty(MDW_CONFIG_LOCATION);
if (configLoc != null) {
if (!configLoc.endsWith("/"))
configLoc = configLoc + "/";
configLocation = co... | java | public static String getConfigLocation() {
if (configLocation == null) {
String configLoc = System.getProperty(MDW_CONFIG_LOCATION);
if (configLoc != null) {
if (!configLoc.endsWith("/"))
configLoc = configLoc + "/";
configLocation = co... | [
"public",
"static",
"String",
"getConfigLocation",
"(",
")",
"{",
"if",
"(",
"configLocation",
"==",
"null",
")",
"{",
"String",
"configLoc",
"=",
"System",
".",
"getProperty",
"(",
"MDW_CONFIG_LOCATION",
")",
";",
"if",
"(",
"configLoc",
"!=",
"null",
")",
... | Directory where MDW config files can be found. | [
"Directory",
"where",
"MDW",
"config",
"files",
"can",
"be",
"found",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/config/PropertyManager.java#L100-L111 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/config/PropertyManager.java | PropertyManager.getInstance | public static PropertyManager getInstance() {
if (instance == null) {
try {
initializePropertyManager();
}
catch (StartupException e) {
// should not reach here, as the property manager should be
// initialized by now
... | java | public static PropertyManager getInstance() {
if (instance == null) {
try {
initializePropertyManager();
}
catch (StartupException e) {
// should not reach here, as the property manager should be
// initialized by now
... | [
"public",
"static",
"PropertyManager",
"getInstance",
"(",
")",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"{",
"try",
"{",
"initializePropertyManager",
"(",
")",
";",
"}",
"catch",
"(",
"StartupException",
"e",
")",
"{",
"// should not reach here, as the pr... | returns the handle to the property manager
@return PropertyManager | [
"returns",
"the",
"handle",
"to",
"the",
"property",
"manager"
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/config/PropertyManager.java#L118-L131 | train |
CenturyLinkCloud/mdw | mdw-common/src/com/centurylink/mdw/util/ClasspathUtil.java | ClasspathUtil.locate | public static String locate(String className, ClassLoader classLoader) {
String resource = new String(className);
// format the file name into a valid resource name
if (!resource.startsWith("/")) {
resource = "/" + resource;
}
resource = resource.replace('.', '/');
... | java | public static String locate(String className, ClassLoader classLoader) {
String resource = new String(className);
// format the file name into a valid resource name
if (!resource.startsWith("/")) {
resource = "/" + resource;
}
resource = resource.replace('.', '/');
... | [
"public",
"static",
"String",
"locate",
"(",
"String",
"className",
",",
"ClassLoader",
"classLoader",
")",
"{",
"String",
"resource",
"=",
"new",
"String",
"(",
"className",
")",
";",
"// format the file name into a valid resource name",
"if",
"(",
"!",
"resource",... | Finds the location of the version of a particular class that will be used
by the Java runtime. Output goes to standard out.
@param className
@return whether the class was located | [
"Finds",
"the",
"location",
"of",
"the",
"version",
"of",
"a",
"particular",
"class",
"that",
"will",
"be",
"used",
"by",
"the",
"Java",
"runtime",
".",
"Output",
"goes",
"to",
"standard",
"out",
"."
] | 91167fe65a25a5d7022cdcf8b0fae8506f5b87ce | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/ClasspathUtil.java#L43-L67 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.