id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
126,100 | Netflix/eureka | eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java | Applications.shuffleAndIndexInstances | public void shuffleAndIndexInstances(Map<String, Applications> remoteRegionsRegistry,
EurekaClientConfig clientConfig, InstanceRegionChecker instanceRegionChecker) {
shuffleInstances(clientConfig.shouldFilterOnlyUpInstances(), true, remoteRegionsRegistry, clientConfig,
instanceRegion... | java | public void shuffleAndIndexInstances(Map<String, Applications> remoteRegionsRegistry,
EurekaClientConfig clientConfig, InstanceRegionChecker instanceRegionChecker) {
shuffleInstances(clientConfig.shouldFilterOnlyUpInstances(), true, remoteRegionsRegistry, clientConfig,
instanceRegion... | [
"public",
"void",
"shuffleAndIndexInstances",
"(",
"Map",
"<",
"String",
",",
"Applications",
">",
"remoteRegionsRegistry",
",",
"EurekaClientConfig",
"clientConfig",
",",
"InstanceRegionChecker",
"instanceRegionChecker",
")",
"{",
"shuffleInstances",
"(",
"clientConfig",
... | Shuffles a whole region so that the instances will not always be returned
in the same order.
@param remoteRegionsRegistry
the map of remote region names to their registries
@param clientConfig
the {@link EurekaClientConfig}, whose settings will be used to
determine whether to filter to only UP instances
@param instanc... | [
"Shuffles",
"a",
"whole",
"region",
"so",
"that",
"the",
"instances",
"will",
"not",
"always",
"be",
"returned",
"in",
"the",
"same",
"order",
"."
] | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java#L297-L301 |
126,101 | Netflix/eureka | eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java | Applications.getNextIndex | public AtomicLong getNextIndex(String virtualHostname, boolean secure) {
Map<String, VipIndexSupport> index = (secure) ? secureVirtualHostNameAppMap : virtualHostNameAppMap;
return Optional.ofNullable(index.get(virtualHostname.toUpperCase(Locale.ROOT)))
.map(VipIndexSupport::getRoundRobi... | java | public AtomicLong getNextIndex(String virtualHostname, boolean secure) {
Map<String, VipIndexSupport> index = (secure) ? secureVirtualHostNameAppMap : virtualHostNameAppMap;
return Optional.ofNullable(index.get(virtualHostname.toUpperCase(Locale.ROOT)))
.map(VipIndexSupport::getRoundRobi... | [
"public",
"AtomicLong",
"getNextIndex",
"(",
"String",
"virtualHostname",
",",
"boolean",
"secure",
")",
"{",
"Map",
"<",
"String",
",",
"VipIndexSupport",
">",
"index",
"=",
"(",
"secure",
")",
"?",
"secureVirtualHostNameAppMap",
":",
"virtualHostNameAppMap",
";"... | Gets the next round-robin index for the given virtual host name. This
index is reset after every registry fetch cycle.
@param virtualHostname
the virtual host name.
@param secure
indicates whether it is a secure request or a non-secure
request.
@return AtomicLong value representing the next round-robin index. | [
"Gets",
"the",
"next",
"round",
"-",
"robin",
"index",
"for",
"the",
"given",
"virtual",
"host",
"name",
".",
"This",
"index",
"is",
"reset",
"after",
"every",
"registry",
"fetch",
"cycle",
"."
] | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java#L338-L343 |
126,102 | Netflix/eureka | eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java | Applications.addInstanceToMap | private void addInstanceToMap(InstanceInfo info, String vipAddresses, Map<String, VipIndexSupport> vipMap) {
if (vipAddresses != null) {
String[] vipAddressArray = vipAddresses.toUpperCase(Locale.ROOT).split(",");
for (String vipAddress : vipAddressArray) {
VipIndexSuppor... | java | private void addInstanceToMap(InstanceInfo info, String vipAddresses, Map<String, VipIndexSupport> vipMap) {
if (vipAddresses != null) {
String[] vipAddressArray = vipAddresses.toUpperCase(Locale.ROOT).split(",");
for (String vipAddress : vipAddressArray) {
VipIndexSuppor... | [
"private",
"void",
"addInstanceToMap",
"(",
"InstanceInfo",
"info",
",",
"String",
"vipAddresses",
",",
"Map",
"<",
"String",
",",
"VipIndexSupport",
">",
"vipMap",
")",
"{",
"if",
"(",
"vipAddresses",
"!=",
"null",
")",
"{",
"String",
"[",
"]",
"vipAddressA... | Add the instance to the given map based if the vip address matches with
that of the instance. Note that an instance can be mapped to multiple vip
addresses. | [
"Add",
"the",
"instance",
"to",
"the",
"given",
"map",
"based",
"if",
"the",
"vip",
"address",
"matches",
"with",
"that",
"of",
"the",
"instance",
".",
"Note",
"that",
"an",
"instance",
"can",
"be",
"mapped",
"to",
"multiple",
"vip",
"addresses",
"."
] | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java#L375-L383 |
126,103 | Netflix/eureka | eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java | Applications.addInstancesToVIPMaps | private void addInstancesToVIPMaps(Application app, Map<String, VipIndexSupport> virtualHostNameAppMap,
Map<String, VipIndexSupport> secureVirtualHostNameAppMap) {
// Check and add the instances to the their respective virtual host name
// mappings
for (InstanceInfo info : app.getIns... | java | private void addInstancesToVIPMaps(Application app, Map<String, VipIndexSupport> virtualHostNameAppMap,
Map<String, VipIndexSupport> secureVirtualHostNameAppMap) {
// Check and add the instances to the their respective virtual host name
// mappings
for (InstanceInfo info : app.getIns... | [
"private",
"void",
"addInstancesToVIPMaps",
"(",
"Application",
"app",
",",
"Map",
"<",
"String",
",",
"VipIndexSupport",
">",
"virtualHostNameAppMap",
",",
"Map",
"<",
"String",
",",
"VipIndexSupport",
">",
"secureVirtualHostNameAppMap",
")",
"{",
"// Check and add t... | Adds the instances to the internal vip address map.
@param app
- the applications for which the instances need to be added. | [
"Adds",
"the",
"instances",
"to",
"the",
"internal",
"vip",
"address",
"map",
"."
] | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/shared/Applications.java#L391-L406 |
126,104 | Netflix/eureka | eureka-client-jersey2/src/main/java/com/netflix/discovery/shared/transport/jersey2/EurekaJersey2ClientImpl.java | EurekaJersey2ClientImpl.destroyResources | @Override
public void destroyResources() {
if (eurekaConnCleaner != null) {
// Execute the connection cleaner one final time during shutdown
eurekaConnCleaner.execute(connectionCleanerTask);
eurekaConnCleaner.shutdown();
}
if (apacheHttpClient != null) {
... | java | @Override
public void destroyResources() {
if (eurekaConnCleaner != null) {
// Execute the connection cleaner one final time during shutdown
eurekaConnCleaner.execute(connectionCleanerTask);
eurekaConnCleaner.shutdown();
}
if (apacheHttpClient != null) {
... | [
"@",
"Override",
"public",
"void",
"destroyResources",
"(",
")",
"{",
"if",
"(",
"eurekaConnCleaner",
"!=",
"null",
")",
"{",
"// Execute the connection cleaner one final time during shutdown",
"eurekaConnCleaner",
".",
"execute",
"(",
"connectionCleanerTask",
")",
";",
... | Clean up resources. | [
"Clean",
"up",
"resources",
"."
] | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client-jersey2/src/main/java/com/netflix/discovery/shared/transport/jersey2/EurekaJersey2ClientImpl.java#L110-L120 |
126,105 | Netflix/eureka | eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java | InstanceInfo.getHealthCheckUrls | @JsonIgnore
public Set<String> getHealthCheckUrls() {
Set<String> healthCheckUrlSet = new LinkedHashSet<String>();
if (this.isUnsecurePortEnabled && healthCheckUrl != null && !healthCheckUrl.isEmpty()) {
healthCheckUrlSet.add(healthCheckUrl);
}
if (this.isSecurePortEnable... | java | @JsonIgnore
public Set<String> getHealthCheckUrls() {
Set<String> healthCheckUrlSet = new LinkedHashSet<String>();
if (this.isUnsecurePortEnabled && healthCheckUrl != null && !healthCheckUrl.isEmpty()) {
healthCheckUrlSet.add(healthCheckUrl);
}
if (this.isSecurePortEnable... | [
"@",
"JsonIgnore",
"public",
"Set",
"<",
"String",
">",
"getHealthCheckUrls",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"healthCheckUrlSet",
"=",
"new",
"LinkedHashSet",
"<",
"String",
">",
"(",
")",
";",
"if",
"(",
"this",
".",
"isUnsecurePortEnabled",
"&... | Gets the absolute URLs for the health check page for both secure and
non-secure protocols. If the port is not enabled then the URL is
excluded.
@return A Set containing the string representation of health check urls
for secure and non secure protocols | [
"Gets",
"the",
"absolute",
"URLs",
"for",
"the",
"health",
"check",
"page",
"for",
"both",
"secure",
"and",
"non",
"-",
"secure",
"protocols",
".",
"If",
"the",
"port",
"is",
"not",
"enabled",
"then",
"the",
"URL",
"is",
"excluded",
"."
] | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java#L1103-L1113 |
126,106 | Netflix/eureka | eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java | InstanceInfo.setStatus | public synchronized InstanceStatus setStatus(InstanceStatus status) {
if (this.status != status) {
InstanceStatus prev = this.status;
this.status = status;
setIsDirty();
return prev;
}
return null;
} | java | public synchronized InstanceStatus setStatus(InstanceStatus status) {
if (this.status != status) {
InstanceStatus prev = this.status;
this.status = status;
setIsDirty();
return prev;
}
return null;
} | [
"public",
"synchronized",
"InstanceStatus",
"setStatus",
"(",
"InstanceStatus",
"status",
")",
"{",
"if",
"(",
"this",
".",
"status",
"!=",
"status",
")",
"{",
"InstanceStatus",
"prev",
"=",
"this",
".",
"status",
";",
"this",
".",
"status",
"=",
"status",
... | Set the status for this instance.
@param status status for this instance.
@return the prev status if a different status from the current was set, null otherwise | [
"Set",
"the",
"status",
"for",
"this",
"instance",
"."
] | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java#L1168-L1176 |
126,107 | Netflix/eureka | eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java | InstanceInfo.getZone | public static String getZone(String[] availZones, InstanceInfo myInfo) {
String instanceZone = ((availZones == null || availZones.length == 0) ? "default"
: availZones[0]);
if (myInfo != null
&& myInfo.getDataCenterInfo().getName() == DataCenterInfo.Name.Amazon) {
... | java | public static String getZone(String[] availZones, InstanceInfo myInfo) {
String instanceZone = ((availZones == null || availZones.length == 0) ? "default"
: availZones[0]);
if (myInfo != null
&& myInfo.getDataCenterInfo().getName() == DataCenterInfo.Name.Amazon) {
... | [
"public",
"static",
"String",
"getZone",
"(",
"String",
"[",
"]",
"availZones",
",",
"InstanceInfo",
"myInfo",
")",
"{",
"String",
"instanceZone",
"=",
"(",
"(",
"availZones",
"==",
"null",
"||",
"availZones",
".",
"length",
"==",
"0",
")",
"?",
"\"default... | Get the zone that a particular instance is in.
Note that for AWS deployments, myInfo should contain AWS dataCenterInfo which should contain
the AWS zone of the instance, and availZones is ignored.
@param availZones the list of available zones for non-AWS deployments
@param myInfo
- The InstanceInfo object of the insta... | [
"Get",
"the",
"zone",
"that",
"a",
"particular",
"instance",
"is",
"in",
".",
"Note",
"that",
"for",
"AWS",
"deployments",
"myInfo",
"should",
"contain",
"AWS",
"dataCenterInfo",
"which",
"should",
"contain",
"the",
"AWS",
"zone",
"of",
"the",
"instance",
"a... | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java#L1372-L1386 |
126,108 | Netflix/eureka | eureka-client/src/main/java/com/netflix/discovery/converters/wrappers/CodecWrappers.java | CodecWrappers.resolveDecoder | public static synchronized DecoderWrapper resolveDecoder(String name, String eurekaAccept) {
EurekaAccept accept = EurekaAccept.fromString(eurekaAccept);
switch (accept) {
case compact:
return getDecoder(JacksonJsonMini.class);
case full:
default:
... | java | public static synchronized DecoderWrapper resolveDecoder(String name, String eurekaAccept) {
EurekaAccept accept = EurekaAccept.fromString(eurekaAccept);
switch (accept) {
case compact:
return getDecoder(JacksonJsonMini.class);
case full:
default:
... | [
"public",
"static",
"synchronized",
"DecoderWrapper",
"resolveDecoder",
"(",
"String",
"name",
",",
"String",
"eurekaAccept",
")",
"{",
"EurekaAccept",
"accept",
"=",
"EurekaAccept",
".",
"fromString",
"(",
"eurekaAccept",
")",
";",
"switch",
"(",
"accept",
")",
... | Resolve the decoder to use based on the specified decoder name, as well as the specified eurekaAccept.
The eurekAccept trumps the decoder name if the decoder specified is one that is not valid for use for the
specified eurekaAccept. | [
"Resolve",
"the",
"decoder",
"to",
"use",
"based",
"on",
"the",
"specified",
"decoder",
"name",
"as",
"well",
"as",
"the",
"specified",
"eurekaAccept",
".",
"The",
"eurekAccept",
"trumps",
"the",
"decoder",
"name",
"if",
"the",
"decoder",
"specified",
"is",
... | 48446d956be09df6650a3c00b7ebd7e2d1e1544f | https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/converters/wrappers/CodecWrappers.java#L93-L102 |
126,109 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/CollectionUtil.java | CollectionUtil.map | public static Map<String, Object> map(Object... objects) {
if (objects.length % 2 != 0) {
throw new ActivitiIllegalArgumentException("The input should always be even since we expect a list of key-value pairs!");
}
Map<String, Object> map = new HashMap<String, Object>();
for (int i = 0; i < objec... | java | public static Map<String, Object> map(Object... objects) {
if (objects.length % 2 != 0) {
throw new ActivitiIllegalArgumentException("The input should always be even since we expect a list of key-value pairs!");
}
Map<String, Object> map = new HashMap<String, Object>();
for (int i = 0; i < objec... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
"(",
"Object",
"...",
"objects",
")",
"{",
"if",
"(",
"objects",
".",
"length",
"%",
"2",
"!=",
"0",
")",
"{",
"throw",
"new",
"ActivitiIllegalArgumentException",
"(",
"\"The input should... | Helper method to easily create a map.
Takes as input a varargs containing the key1, value1, key2, value2, etc. Note: although an Object, we will cast the key to String internally. | [
"Helper",
"method",
"to",
"easily",
"create",
"a",
"map",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/CollectionUtil.java#L48-L60 |
126,110 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java | CallActivityBehavior.findProcessDefinition | protected ProcessDefinition findProcessDefinition(String processDefinitionKey, String tenantId) {
if (tenantId == null || ProcessEngineConfiguration.NO_TENANT_ID.equals(tenantId)) {
return Context.getProcessEngineConfiguration().getDeploymentManager().findDeployedLatestProcessDefinitionByKey(processDefinition... | java | protected ProcessDefinition findProcessDefinition(String processDefinitionKey, String tenantId) {
if (tenantId == null || ProcessEngineConfiguration.NO_TENANT_ID.equals(tenantId)) {
return Context.getProcessEngineConfiguration().getDeploymentManager().findDeployedLatestProcessDefinitionByKey(processDefinition... | [
"protected",
"ProcessDefinition",
"findProcessDefinition",
"(",
"String",
"processDefinitionKey",
",",
"String",
"tenantId",
")",
"{",
"if",
"(",
"tenantId",
"==",
"null",
"||",
"ProcessEngineConfiguration",
".",
"NO_TENANT_ID",
".",
"equals",
"(",
"tenantId",
")",
... | Allow subclass to determine which version of a process to start. | [
"Allow",
"subclass",
"to",
"determine",
"which",
"version",
"of",
"a",
"process",
"to",
"start",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java#L175-L181 |
126,111 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java | CallActivityBehavior.initializeVariables | protected void initializeVariables(ExecutionEntity subProcessInstance, Map<String,Object> variables) {
subProcessInstance.setVariables(variables);
} | java | protected void initializeVariables(ExecutionEntity subProcessInstance, Map<String,Object> variables) {
subProcessInstance.setVariables(variables);
} | [
"protected",
"void",
"initializeVariables",
"(",
"ExecutionEntity",
"subProcessInstance",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"variables",
")",
"{",
"subProcessInstance",
".",
"setVariables",
"(",
"variables",
")",
";",
"}"
] | Allow a subclass to override how variables are initialized. | [
"Allow",
"a",
"subclass",
"to",
"override",
"how",
"variables",
"are",
"initialized",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/CallActivityBehavior.java#L196-L198 |
126,112 | Activiti/Activiti | activiti-bpmn-converter/src/main/java/org/activiti/bpmn/converter/BaseBpmnXMLConverter.java | BaseBpmnXMLConverter.parseChildElements | protected void parseChildElements(String elementName, BaseElement parentElement, BpmnModel model, XMLStreamReader xtr) throws Exception {
parseChildElements(elementName, parentElement, null, model, xtr);
} | java | protected void parseChildElements(String elementName, BaseElement parentElement, BpmnModel model, XMLStreamReader xtr) throws Exception {
parseChildElements(elementName, parentElement, null, model, xtr);
} | [
"protected",
"void",
"parseChildElements",
"(",
"String",
"elementName",
",",
"BaseElement",
"parentElement",
",",
"BpmnModel",
"model",
",",
"XMLStreamReader",
"xtr",
")",
"throws",
"Exception",
"{",
"parseChildElements",
"(",
"elementName",
",",
"parentElement",
","... | To BpmnModel converter convenience methods | [
"To",
"BpmnModel",
"converter",
"convenience",
"methods"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-converter/src/main/java/org/activiti/bpmn/converter/BaseBpmnXMLConverter.java#L235-L237 |
126,113 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/VariableScopeImpl.java | VariableScopeImpl.createVariableLocal | protected void createVariableLocal(String variableName, Object value, ExecutionEntity sourceActivityExecution) {
ensureVariableInstancesInitialized();
if (variableInstances.containsKey(variableName)) {
throw new ActivitiException("variable '" + variableName + "' already exists. Use setVariableLocal if yo... | java | protected void createVariableLocal(String variableName, Object value, ExecutionEntity sourceActivityExecution) {
ensureVariableInstancesInitialized();
if (variableInstances.containsKey(variableName)) {
throw new ActivitiException("variable '" + variableName + "' already exists. Use setVariableLocal if yo... | [
"protected",
"void",
"createVariableLocal",
"(",
"String",
"variableName",
",",
"Object",
"value",
",",
"ExecutionEntity",
"sourceActivityExecution",
")",
"{",
"ensureVariableInstancesInitialized",
"(",
")",
";",
"if",
"(",
"variableInstances",
".",
"containsKey",
"(",
... | only called when a new variable is created on this variable scope. This method is also responsible for propagating the creation of this variable to the history. | [
"only",
"called",
"when",
"a",
"new",
"variable",
"is",
"created",
"on",
"this",
"variable",
"scope",
".",
"This",
"method",
"is",
"also",
"responsible",
"for",
"propagating",
"the",
"creation",
"of",
"this",
"variable",
"to",
"the",
"history",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/VariableScopeImpl.java#L782-L790 |
126,114 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/ExecutionEntityManagerImpl.java | ExecutionEntityManagerImpl.createChildExecution | @Override
public ExecutionEntity createChildExecution(ExecutionEntity parentExecutionEntity) {
ExecutionEntity childExecution = executionDataManager.create();
inheritCommonProperties(parentExecutionEntity, childExecution);
childExecution.setParent(parentExecutionEntity);
childExecution.setProcessDefin... | java | @Override
public ExecutionEntity createChildExecution(ExecutionEntity parentExecutionEntity) {
ExecutionEntity childExecution = executionDataManager.create();
inheritCommonProperties(parentExecutionEntity, childExecution);
childExecution.setParent(parentExecutionEntity);
childExecution.setProcessDefin... | [
"@",
"Override",
"public",
"ExecutionEntity",
"createChildExecution",
"(",
"ExecutionEntity",
"parentExecutionEntity",
")",
"{",
"ExecutionEntity",
"childExecution",
"=",
"executionDataManager",
".",
"create",
"(",
")",
";",
"inheritCommonProperties",
"(",
"parentExecutionE... | Creates a new execution. properties processDefinition, processInstance and activity will be initialized. | [
"Creates",
"a",
"new",
"execution",
".",
"properties",
"processDefinition",
"processInstance",
"and",
"activity",
"will",
"be",
"initialized",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/ExecutionEntityManagerImpl.java#L258-L286 |
126,115 | Activiti/Activiti | activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BpmnAutoLayout.java | BpmnAutoLayout.ensureSequenceFlowIdSet | protected void ensureSequenceFlowIdSet(SequenceFlow sequenceFlow) {
// We really must have ids for sequence flow to be able to generate
// stuff
if (sequenceFlow.getId() == null) {
sequenceFlow.setId("sequenceFlow-" + UUID.randomUUID().toString());
}
} | java | protected void ensureSequenceFlowIdSet(SequenceFlow sequenceFlow) {
// We really must have ids for sequence flow to be able to generate
// stuff
if (sequenceFlow.getId() == null) {
sequenceFlow.setId("sequenceFlow-" + UUID.randomUUID().toString());
}
} | [
"protected",
"void",
"ensureSequenceFlowIdSet",
"(",
"SequenceFlow",
"sequenceFlow",
")",
"{",
"// We really must have ids for sequence flow to be able to generate",
"// stuff",
"if",
"(",
"sequenceFlow",
".",
"getId",
"(",
")",
"==",
"null",
")",
"{",
"sequenceFlow",
"."... | BPMN element handling | [
"BPMN",
"element",
"handling"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BpmnAutoLayout.java#L184-L190 |
126,116 | Activiti/Activiti | activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BpmnAutoLayout.java | BpmnAutoLayout.createEventVertex | protected void createEventVertex(FlowElement flowElement) {
// Add styling for events if needed
if (!graph.getStylesheet().getStyles().containsKey(STYLE_EVENT)) {
Hashtable<String, Object> eventStyle = new Hashtable<String, Object>();
eventStyle.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_ELLIPSE... | java | protected void createEventVertex(FlowElement flowElement) {
// Add styling for events if needed
if (!graph.getStylesheet().getStyles().containsKey(STYLE_EVENT)) {
Hashtable<String, Object> eventStyle = new Hashtable<String, Object>();
eventStyle.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_ELLIPSE... | [
"protected",
"void",
"createEventVertex",
"(",
"FlowElement",
"flowElement",
")",
"{",
"// Add styling for events if needed",
"if",
"(",
"!",
"graph",
".",
"getStylesheet",
"(",
")",
".",
"getStyles",
"(",
")",
".",
"containsKey",
"(",
"STYLE_EVENT",
")",
")",
"... | Graph cell creation | [
"Graph",
"cell",
"creation"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BpmnAutoLayout.java#L333-L344 |
126,117 | Activiti/Activiti | activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BpmnAutoLayout.java | BpmnAutoLayout.optimizeEdgePoints | protected List<mxPoint> optimizeEdgePoints(List<mxPoint> unoptimizedPointsList) {
List<mxPoint> optimizedPointsList = new ArrayList<mxPoint>();
for (int i = 0; i < unoptimizedPointsList.size(); i++) {
boolean keepPoint = true;
mxPoint currentPoint = unoptimizedPointsList.get(i);
// When thre... | java | protected List<mxPoint> optimizeEdgePoints(List<mxPoint> unoptimizedPointsList) {
List<mxPoint> optimizedPointsList = new ArrayList<mxPoint>();
for (int i = 0; i < unoptimizedPointsList.size(); i++) {
boolean keepPoint = true;
mxPoint currentPoint = unoptimizedPointsList.get(i);
// When thre... | [
"protected",
"List",
"<",
"mxPoint",
">",
"optimizeEdgePoints",
"(",
"List",
"<",
"mxPoint",
">",
"unoptimizedPointsList",
")",
"{",
"List",
"<",
"mxPoint",
">",
"optimizedPointsList",
"=",
"new",
"ArrayList",
"<",
"mxPoint",
">",
"(",
")",
";",
"for",
"(",
... | This method will remove any such points. | [
"This",
"method",
"will",
"remove",
"any",
"such",
"points",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BpmnAutoLayout.java#L451-L480 |
126,118 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/event/logger/EventLogger.java | EventLogger.getEventHandler | protected EventLoggerEventHandler getEventHandler(ActivitiEvent event) {
Class<? extends EventLoggerEventHandler> eventHandlerClass = null;
if (event.getType().equals(ActivitiEventType.ENTITY_INITIALIZED)) {
Object entity = ((ActivitiEntityEvent) event).getEntity();
if (entity instanceof ExecutionEntity) {
... | java | protected EventLoggerEventHandler getEventHandler(ActivitiEvent event) {
Class<? extends EventLoggerEventHandler> eventHandlerClass = null;
if (event.getType().equals(ActivitiEventType.ENTITY_INITIALIZED)) {
Object entity = ((ActivitiEntityEvent) event).getEntity();
if (entity instanceof ExecutionEntity) {
... | [
"protected",
"EventLoggerEventHandler",
"getEventHandler",
"(",
"ActivitiEvent",
"event",
")",
"{",
"Class",
"<",
"?",
"extends",
"EventLoggerEventHandler",
">",
"eventHandlerClass",
"=",
"null",
";",
"if",
"(",
"event",
".",
"getType",
"(",
")",
".",
"equals",
... | Subclasses can override this if defaults are not ok | [
"Subclasses",
"can",
"override",
"this",
"if",
"defaults",
"are",
"not",
"ok"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/event/logger/EventLogger.java#L136-L165 |
126,119 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/DefaultAsyncJobExecutor.java | DefaultAsyncJobExecutor.start | public void start() {
if (isActive) {
return;
}
log.info("Starting up the default async job executor [{}].", getClass().getName());
if (timerJobRunnable == null) {
timerJobRunnable = new AcquireTimerJobsRunnable(this, processEngineConfiguration.getJobManager());
}
if (rese... | java | public void start() {
if (isActive) {
return;
}
log.info("Starting up the default async job executor [{}].", getClass().getName());
if (timerJobRunnable == null) {
timerJobRunnable = new AcquireTimerJobsRunnable(this, processEngineConfiguration.getJobManager());
}
if (rese... | [
"public",
"void",
"start",
"(",
")",
"{",
"if",
"(",
"isActive",
")",
"{",
"return",
";",
"}",
"log",
".",
"info",
"(",
"\"Starting up the default async job executor [{}].\"",
",",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"tim... | Starts the async executor | [
"Starts",
"the",
"async",
"executor"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/DefaultAsyncJobExecutor.java#L164-L194 |
126,120 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/DefaultAsyncJobExecutor.java | DefaultAsyncJobExecutor.shutdown | public synchronized void shutdown() {
if (!isActive) {
return;
}
log.info("Shutting down the default async job executor [{}].", getClass().getName());
if (timerJobRunnable != null) {
timerJobRunnable.stop();
}
if (asyncJobsDueRunnable != null) {
asyncJobsDueRunnable.stop()... | java | public synchronized void shutdown() {
if (!isActive) {
return;
}
log.info("Shutting down the default async job executor [{}].", getClass().getName());
if (timerJobRunnable != null) {
timerJobRunnable.stop();
}
if (asyncJobsDueRunnable != null) {
asyncJobsDueRunnable.stop()... | [
"public",
"synchronized",
"void",
"shutdown",
"(",
")",
"{",
"if",
"(",
"!",
"isActive",
")",
"{",
"return",
";",
"}",
"log",
".",
"info",
"(",
"\"Shutting down the default async job executor [{}].\"",
",",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")"... | Shuts down the whole job executor | [
"Shuts",
"down",
"the",
"whole",
"job",
"executor"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/DefaultAsyncJobExecutor.java#L204-L230 |
126,121 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/DefaultAsyncJobExecutor.java | DefaultAsyncJobExecutor.stopJobAcquisitionThread | protected void stopJobAcquisitionThread() {
if (asyncJobAcquisitionThread != null) {
try {
asyncJobAcquisitionThread.join();
} catch (InterruptedException e) {
log.warn("Interrupted while waiting for the async job acquisition thread to terminate", e);
}
asyncJobAcquisitionThr... | java | protected void stopJobAcquisitionThread() {
if (asyncJobAcquisitionThread != null) {
try {
asyncJobAcquisitionThread.join();
} catch (InterruptedException e) {
log.warn("Interrupted while waiting for the async job acquisition thread to terminate", e);
}
asyncJobAcquisitionThr... | [
"protected",
"void",
"stopJobAcquisitionThread",
"(",
")",
"{",
"if",
"(",
"asyncJobAcquisitionThread",
"!=",
"null",
")",
"{",
"try",
"{",
"asyncJobAcquisitionThread",
".",
"join",
"(",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"log"... | Stops the acquisition thread | [
"Stops",
"the",
"acquisition",
"thread"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/DefaultAsyncJobExecutor.java#L281-L290 |
126,122 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/DefaultAsyncJobExecutor.java | DefaultAsyncJobExecutor.stopResetExpiredJobsThread | protected void stopResetExpiredJobsThread() {
if (resetExpiredJobThread != null) {
try {
resetExpiredJobThread.join();
} catch (InterruptedException e) {
log.warn("Interrupted while waiting for the reset expired jobs thread to terminate", e);
}
resetExpiredJobThread = null... | java | protected void stopResetExpiredJobsThread() {
if (resetExpiredJobThread != null) {
try {
resetExpiredJobThread.join();
} catch (InterruptedException e) {
log.warn("Interrupted while waiting for the reset expired jobs thread to terminate", e);
}
resetExpiredJobThread = null... | [
"protected",
"void",
"stopResetExpiredJobsThread",
"(",
")",
"{",
"if",
"(",
"resetExpiredJobThread",
"!=",
"null",
")",
"{",
"try",
"{",
"resetExpiredJobThread",
".",
"join",
"(",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"log",
".... | Stops the reset expired jobs thread | [
"Stops",
"the",
"reset",
"expired",
"jobs",
"thread"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/DefaultAsyncJobExecutor.java#L312-L322 |
126,123 | Activiti/Activiti | activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramGenerator.java | DefaultProcessDiagramGenerator.getDefaultDiagram | protected InputStream getDefaultDiagram(String diagramImageFileName) {
String imageFileName = diagramImageFileName != null ?
diagramImageFileName :
getDefaultDiagramImageFileName();
InputStream imageStream = getClass().getResourceAsStream(imageFileName);
if (image... | java | protected InputStream getDefaultDiagram(String diagramImageFileName) {
String imageFileName = diagramImageFileName != null ?
diagramImageFileName :
getDefaultDiagramImageFileName();
InputStream imageStream = getClass().getResourceAsStream(imageFileName);
if (image... | [
"protected",
"InputStream",
"getDefaultDiagram",
"(",
"String",
"diagramImageFileName",
")",
"{",
"String",
"imageFileName",
"=",
"diagramImageFileName",
"!=",
"null",
"?",
"diagramImageFileName",
":",
"getDefaultDiagramImageFileName",
"(",
")",
";",
"InputStream",
"image... | Get default diagram image as bytes array
@return the default diagram image | [
"Get",
"default",
"diagram",
"image",
"as",
"bytes",
"array"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramGenerator.java#L673-L682 |
126,124 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/ExecutionEntityImpl.java | ExecutionEntityImpl.getCurrentFlowElement | public FlowElement getCurrentFlowElement() {
if (currentFlowElement == null) {
String processDefinitionId = getProcessDefinitionId();
if (processDefinitionId != null) {
org.activiti.bpmn.model.Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
currentFlowElement = p... | java | public FlowElement getCurrentFlowElement() {
if (currentFlowElement == null) {
String processDefinitionId = getProcessDefinitionId();
if (processDefinitionId != null) {
org.activiti.bpmn.model.Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
currentFlowElement = p... | [
"public",
"FlowElement",
"getCurrentFlowElement",
"(",
")",
"{",
"if",
"(",
"currentFlowElement",
"==",
"null",
")",
"{",
"String",
"processDefinitionId",
"=",
"getProcessDefinitionId",
"(",
")",
";",
"if",
"(",
"processDefinitionId",
"!=",
"null",
")",
"{",
"or... | The current flow element, will be filled during operation execution | [
"The",
"current",
"flow",
"element",
"will",
"be",
"filled",
"during",
"operation",
"execution"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/ExecutionEntityImpl.java#L261-L270 |
126,125 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl.java | ProcessEngineConfigurationImpl.addWsEndpointAddress | public ProcessEngineConfiguration addWsEndpointAddress(QName endpointName, URL address) {
this.wsOverridenEndpointAddresses.put(endpointName, address);
return this;
} | java | public ProcessEngineConfiguration addWsEndpointAddress(QName endpointName, URL address) {
this.wsOverridenEndpointAddresses.put(endpointName, address);
return this;
} | [
"public",
"ProcessEngineConfiguration",
"addWsEndpointAddress",
"(",
"QName",
"endpointName",
",",
"URL",
"address",
")",
"{",
"this",
".",
"wsOverridenEndpointAddresses",
".",
"put",
"(",
"endpointName",
",",
"address",
")",
";",
"return",
"this",
";",
"}"
] | Add or replace the address of the given web-service endpoint with the given value
@param endpointName The endpoint name for which a new address must be set
@param address The new address of the endpoint | [
"Add",
"or",
"replace",
"the",
"address",
"of",
"the",
"given",
"web",
"-",
"service",
"endpoint",
"with",
"the",
"given",
"value"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl.java#L2427-L2430 |
126,126 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/IntermediateCatchEventActivityBehavior.java | IntermediateCatchEventActivityBehavior.eventCancelledByEventGateway | public void eventCancelledByEventGateway(DelegateExecution execution) {
Context.getCommandContext().getExecutionEntityManager().deleteExecutionAndRelatedData((ExecutionEntity) execution,
DeleteReason.EVENT_BASED_GATEWAY_CANCEL, false);
} | java | public void eventCancelledByEventGateway(DelegateExecution execution) {
Context.getCommandContext().getExecutionEntityManager().deleteExecutionAndRelatedData((ExecutionEntity) execution,
DeleteReason.EVENT_BASED_GATEWAY_CANCEL, false);
} | [
"public",
"void",
"eventCancelledByEventGateway",
"(",
"DelegateExecution",
"execution",
")",
"{",
"Context",
".",
"getCommandContext",
"(",
")",
".",
"getExecutionEntityManager",
"(",
")",
".",
"deleteExecutionAndRelatedData",
"(",
"(",
"ExecutionEntity",
")",
"executi... | Should be subclassed by the more specific types.
For an intermediate catch without type, it's simply leaving the event. | [
"Should",
"be",
"subclassed",
"by",
"the",
"more",
"specific",
"types",
".",
"For",
"an",
"intermediate",
"catch",
"without",
"type",
"it",
"s",
"simply",
"leaving",
"the",
"event",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/IntermediateCatchEventActivityBehavior.java#L62-L65 |
126,127 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/json/XML.java | XML.noSpace | public static void noSpace(String string) throws JSONException {
int i, length = string.length();
if (length == 0) {
throw new JSONException("Empty string.");
}
for (i = 0; i < length; i += 1) {
if (Character.isWhitespace(string.charAt(i))) {
throw new JSONException("'" + string + "'... | java | public static void noSpace(String string) throws JSONException {
int i, length = string.length();
if (length == 0) {
throw new JSONException("Empty string.");
}
for (i = 0; i < length; i += 1) {
if (Character.isWhitespace(string.charAt(i))) {
throw new JSONException("'" + string + "'... | [
"public",
"static",
"void",
"noSpace",
"(",
"String",
"string",
")",
"throws",
"JSONException",
"{",
"int",
"i",
",",
"length",
"=",
"string",
".",
"length",
"(",
")",
";",
"if",
"(",
"length",
"==",
"0",
")",
"{",
"throw",
"new",
"JSONException",
"(",... | Throw an exception if the string contains whitespace. Whitespace is not allowed in tagNames and attributes.
@param string
@throws JSONException | [
"Throw",
"an",
"exception",
"if",
"the",
"string",
"contains",
"whitespace",
".",
"Whitespace",
"is",
"not",
"allowed",
"in",
"tagNames",
"and",
"attributes",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/json/XML.java#L108-L118 |
126,128 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/BitMaskUtil.java | BitMaskUtil.setBit | public static int setBit(int value, int bitNumber, boolean bitValue) {
if (bitValue) {
return setBitOn(value, bitNumber);
} else {
return setBitOff(value, bitNumber);
}
} | java | public static int setBit(int value, int bitNumber, boolean bitValue) {
if (bitValue) {
return setBitOn(value, bitNumber);
} else {
return setBitOff(value, bitNumber);
}
} | [
"public",
"static",
"int",
"setBit",
"(",
"int",
"value",
",",
"int",
"bitNumber",
",",
"boolean",
"bitValue",
")",
"{",
"if",
"(",
"bitValue",
")",
"{",
"return",
"setBitOn",
"(",
"value",
",",
"bitNumber",
")",
";",
"}",
"else",
"{",
"return",
"setBi... | Set bit to '0' or '1' in the given int.
@param current
integer value
@param bitNumber
number of the bit to set to '0' or '1' (right first bit starting at 1).
@param bitValue
if true, bit set to '1'. If false, '0'. | [
"Set",
"bit",
"to",
"0",
"or",
"1",
"in",
"the",
"given",
"int",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/BitMaskUtil.java#L99-L105 |
126,129 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/ExecuteAsyncRunnable.java | ExecuteAsyncRunnable.lockJobIfNeeded | protected boolean lockJobIfNeeded() {
try {
if (job.isExclusive()) {
processEngineConfiguration.getCommandExecutor().execute(new LockExclusiveJobCmd(job));
}
} catch (Throwable lockException) {
if (log.isDebugEnabled()) {
log.debug("Could not lock exclusive job. Unlocking job ... | java | protected boolean lockJobIfNeeded() {
try {
if (job.isExclusive()) {
processEngineConfiguration.getCommandExecutor().execute(new LockExclusiveJobCmd(job));
}
} catch (Throwable lockException) {
if (log.isDebugEnabled()) {
log.debug("Could not lock exclusive job. Unlocking job ... | [
"protected",
"boolean",
"lockJobIfNeeded",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"job",
".",
"isExclusive",
"(",
")",
")",
"{",
"processEngineConfiguration",
".",
"getCommandExecutor",
"(",
")",
".",
"execute",
"(",
"new",
"LockExclusiveJobCmd",
"(",
"job",
... | Returns true if lock succeeded, or no lock was needed.
Returns false if locking was unsuccessfull. | [
"Returns",
"true",
"if",
"lock",
"succeeded",
"or",
"no",
"lock",
"was",
"needed",
".",
"Returns",
"false",
"if",
"locking",
"was",
"unsuccessfull",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/asyncexecutor/ExecuteAsyncRunnable.java#L122-L140 |
126,130 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/BpmnActivityBehavior.java | BpmnActivityBehavior.dispatchJobCanceledEvents | protected void dispatchJobCanceledEvents(ExecutionEntity activityExecution) {
if (activityExecution != null) {
List<JobEntity> jobs = activityExecution.getJobs();
for (JobEntity job : jobs) {
if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
... | java | protected void dispatchJobCanceledEvents(ExecutionEntity activityExecution) {
if (activityExecution != null) {
List<JobEntity> jobs = activityExecution.getJobs();
for (JobEntity job : jobs) {
if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
... | [
"protected",
"void",
"dispatchJobCanceledEvents",
"(",
"ExecutionEntity",
"activityExecution",
")",
"{",
"if",
"(",
"activityExecution",
"!=",
"null",
")",
"{",
"List",
"<",
"JobEntity",
">",
"jobs",
"=",
"activityExecution",
".",
"getJobs",
"(",
")",
";",
"for"... | dispatch job canceled event for job associated with given execution entity
@param activityExecution | [
"dispatch",
"job",
"canceled",
"event",
"for",
"job",
"associated",
"with",
"given",
"execution",
"entity"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/BpmnActivityBehavior.java#L52-L70 |
126,131 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/MultiInstanceActivityBehavior.java | MultiInstanceActivityBehavior.callActivityEndListeners | protected void callActivityEndListeners(DelegateExecution execution) {
Context.getCommandContext().getProcessEngineConfiguration().getListenerNotificationHelper()
.executeExecutionListeners(activity, execution, ExecutionListener.EVENTNAME_END);
} | java | protected void callActivityEndListeners(DelegateExecution execution) {
Context.getCommandContext().getProcessEngineConfiguration().getListenerNotificationHelper()
.executeExecutionListeners(activity, execution, ExecutionListener.EVENTNAME_END);
} | [
"protected",
"void",
"callActivityEndListeners",
"(",
"DelegateExecution",
"execution",
")",
"{",
"Context",
".",
"getCommandContext",
"(",
")",
".",
"getProcessEngineConfiguration",
"(",
")",
".",
"getListenerNotificationHelper",
"(",
")",
".",
"executeExecutionListeners... | Since no transitions are followed when leaving the inner activity, it is needed to call the end listeners yourself. | [
"Since",
"no",
"transitions",
"are",
"followed",
"when",
"leaving",
"the",
"inner",
"activity",
"it",
"is",
"needed",
"to",
"call",
"the",
"end",
"listeners",
"yourself",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/MultiInstanceActivityBehavior.java#L308-L311 |
126,132 | Activiti/Activiti | activiti-spring-process-extensions/src/main/java/org/activiti/spring/process/ProcessExtensionService.java | ProcessExtensionService.convertJsonVariables | private ProcessExtensionModel convertJsonVariables(ProcessExtensionModel processExtensionModel){
if( processExtensionModel!=null && processExtensionModel.getExtensions()!=null
&& processExtensionModel.getExtensions().getProperties()!=null ){
for(VariableDefinition variableDefinition... | java | private ProcessExtensionModel convertJsonVariables(ProcessExtensionModel processExtensionModel){
if( processExtensionModel!=null && processExtensionModel.getExtensions()!=null
&& processExtensionModel.getExtensions().getProperties()!=null ){
for(VariableDefinition variableDefinition... | [
"private",
"ProcessExtensionModel",
"convertJsonVariables",
"(",
"ProcessExtensionModel",
"processExtensionModel",
")",
"{",
"if",
"(",
"processExtensionModel",
"!=",
"null",
"&&",
"processExtensionModel",
".",
"getExtensions",
"(",
")",
"!=",
"null",
"&&",
"processExtens... | Json variables need to be represented as JsonNode for engine to handle as Json
Do this for any var marked as json or whose type is not recognised from the extension file | [
"Json",
"variables",
"need",
"to",
"be",
"represented",
"as",
"JsonNode",
"for",
"engine",
"to",
"handle",
"as",
"Json",
"Do",
"this",
"for",
"any",
"var",
"marked",
"as",
"json",
"or",
"whose",
"type",
"is",
"not",
"recognised",
"from",
"the",
"extension"... | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-spring-process-extensions/src/main/java/org/activiti/spring/process/ProcessExtensionService.java#L78-L89 |
126,133 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/agenda/AbstractOperation.java | AbstractOperation.getCurrentFlowElement | protected FlowElement getCurrentFlowElement(final ExecutionEntity execution) {
if (execution.getCurrentFlowElement() != null) {
return execution.getCurrentFlowElement();
} else if (execution.getCurrentActivityId() != null) {
String processDefinitionId = execution.getProcessDefinitionId();
org.... | java | protected FlowElement getCurrentFlowElement(final ExecutionEntity execution) {
if (execution.getCurrentFlowElement() != null) {
return execution.getCurrentFlowElement();
} else if (execution.getCurrentActivityId() != null) {
String processDefinitionId = execution.getProcessDefinitionId();
org.... | [
"protected",
"FlowElement",
"getCurrentFlowElement",
"(",
"final",
"ExecutionEntity",
"execution",
")",
"{",
"if",
"(",
"execution",
".",
"getCurrentFlowElement",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"execution",
".",
"getCurrentFlowElement",
"(",
")",
";",... | Helper method to match the activityId of an execution with a FlowElement of the process definition referenced by the execution. | [
"Helper",
"method",
"to",
"match",
"the",
"activityId",
"of",
"an",
"execution",
"with",
"a",
"FlowElement",
"of",
"the",
"process",
"definition",
"referenced",
"by",
"the",
"execution",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/agenda/AbstractOperation.java#L53-L64 |
126,134 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/agenda/AbstractOperation.java | AbstractOperation.findFirstParentScopeExecution | protected ExecutionEntity findFirstParentScopeExecution(ExecutionEntity executionEntity) {
ExecutionEntityManager executionEntityManager = commandContext.getExecutionEntityManager();
ExecutionEntity parentScopeExecution = null;
ExecutionEntity currentlyExaminedExecution = executionEntityManager.findById(exe... | java | protected ExecutionEntity findFirstParentScopeExecution(ExecutionEntity executionEntity) {
ExecutionEntityManager executionEntityManager = commandContext.getExecutionEntityManager();
ExecutionEntity parentScopeExecution = null;
ExecutionEntity currentlyExaminedExecution = executionEntityManager.findById(exe... | [
"protected",
"ExecutionEntity",
"findFirstParentScopeExecution",
"(",
"ExecutionEntity",
"executionEntity",
")",
"{",
"ExecutionEntityManager",
"executionEntityManager",
"=",
"commandContext",
".",
"getExecutionEntityManager",
"(",
")",
";",
"ExecutionEntity",
"parentScopeExecuti... | Returns the first parent execution of the provided execution that is a scope. | [
"Returns",
"the",
"first",
"parent",
"execution",
"of",
"the",
"provided",
"execution",
"that",
"is",
"a",
"scope",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/agenda/AbstractOperation.java#L87-L99 |
126,135 | Activiti/Activiti | activiti-bpmn-converter/src/main/java/org/activiti/bpmn/converter/util/CommaSplitter.java | CommaSplitter.splitCommas | public static List<String> splitCommas(String st) {
List<String> result = new ArrayList<String>();
int offset = 0;
boolean inExpression = false;
for (int i = 0; i < st.length(); i++) {
if (!inExpression && st.charAt(i) == ',') {
if ((i - offset) > 1) {
... | java | public static List<String> splitCommas(String st) {
List<String> result = new ArrayList<String>();
int offset = 0;
boolean inExpression = false;
for (int i = 0; i < st.length(); i++) {
if (!inExpression && st.charAt(i) == ',') {
if ((i - offset) > 1) {
... | [
"public",
"static",
"List",
"<",
"String",
">",
"splitCommas",
"(",
"String",
"st",
")",
"{",
"List",
"<",
"String",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"int",
"offset",
"=",
"0",
";",
"boolean",
"inExpression",
... | split the given spring using commas if they are not inside an expression | [
"split",
"the",
"given",
"spring",
"using",
"commas",
"if",
"they",
"are",
"not",
"inside",
"an",
"expression"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-converter/src/main/java/org/activiti/bpmn/converter/util/CommaSplitter.java#L21-L44 |
126,136 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/ExecutionGraphUtil.java | ExecutionGraphUtil.orderFromRootToLeaf | public static List<ExecutionEntity> orderFromRootToLeaf(Collection<ExecutionEntity> executions) {
List<ExecutionEntity> orderedList = new ArrayList<ExecutionEntity>(executions.size());
// Root elements
HashSet<String> previousIds = new HashSet<String>();
for (ExecutionEntity execution : executions) {
... | java | public static List<ExecutionEntity> orderFromRootToLeaf(Collection<ExecutionEntity> executions) {
List<ExecutionEntity> orderedList = new ArrayList<ExecutionEntity>(executions.size());
// Root elements
HashSet<String> previousIds = new HashSet<String>();
for (ExecutionEntity execution : executions) {
... | [
"public",
"static",
"List",
"<",
"ExecutionEntity",
">",
"orderFromRootToLeaf",
"(",
"Collection",
"<",
"ExecutionEntity",
">",
"executions",
")",
"{",
"List",
"<",
"ExecutionEntity",
">",
"orderedList",
"=",
"new",
"ArrayList",
"<",
"ExecutionEntity",
">",
"(",
... | Takes in a collection of executions belonging to the same process instance. Orders the executions in a list, first elements are the leaf, last element is the root elements. | [
"Takes",
"in",
"a",
"collection",
"of",
"executions",
"belonging",
"to",
"the",
"same",
"process",
"instance",
".",
"Orders",
"the",
"executions",
"in",
"a",
"list",
"first",
"elements",
"are",
"the",
"leaf",
"last",
"element",
"is",
"the",
"root",
"elements... | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/ExecutionGraphUtil.java#L36-L59 |
126,137 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/ExecutionGraphUtil.java | ExecutionGraphUtil.isReachable | public static boolean isReachable(String processDefinitionId, String sourceElementId, String targetElementId) {
// Fetch source and target elements
Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
FlowElement sourceFlowElement = process.getFlowElement(sourceElementId, true);
Fl... | java | public static boolean isReachable(String processDefinitionId, String sourceElementId, String targetElementId) {
// Fetch source and target elements
Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
FlowElement sourceFlowElement = process.getFlowElement(sourceElementId, true);
Fl... | [
"public",
"static",
"boolean",
"isReachable",
"(",
"String",
"processDefinitionId",
",",
"String",
"sourceElementId",
",",
"String",
"targetElementId",
")",
"{",
"// Fetch source and target elements",
"Process",
"process",
"=",
"ProcessDefinitionUtil",
".",
"getProcess",
... | Verifies if the element with the given source identifier can reach the element with the target identifier through following sequence flow. | [
"Verifies",
"if",
"the",
"element",
"with",
"the",
"given",
"source",
"identifier",
"can",
"reach",
"the",
"element",
"with",
"the",
"target",
"identifier",
"through",
"following",
"sequence",
"flow",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/ExecutionGraphUtil.java#L70-L100 |
126,138 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/delegate/event/impl/ActivitiEventDispatcherImpl.java | ActivitiEventDispatcherImpl.extractBpmnModelFromEvent | protected BpmnModel extractBpmnModelFromEvent(ActivitiEvent event) {
BpmnModel result = null;
if (result == null && event.getProcessDefinitionId() != null) {
ProcessDefinition processDefinition = ProcessDefinitionUtil.getProcessDefinition(event.getProcessDefinitionId(), true);
if (processDefini... | java | protected BpmnModel extractBpmnModelFromEvent(ActivitiEvent event) {
BpmnModel result = null;
if (result == null && event.getProcessDefinitionId() != null) {
ProcessDefinition processDefinition = ProcessDefinitionUtil.getProcessDefinition(event.getProcessDefinitionId(), true);
if (processDefini... | [
"protected",
"BpmnModel",
"extractBpmnModelFromEvent",
"(",
"ActivitiEvent",
"event",
")",
"{",
"BpmnModel",
"result",
"=",
"null",
";",
"if",
"(",
"result",
"==",
"null",
"&&",
"event",
".",
"getProcessDefinitionId",
"(",
")",
"!=",
"null",
")",
"{",
"Process... | In case no process-context is active, this method attempts to extract a process-definition based on the event. In case it's an event related to an entity, this can be deducted by inspecting the
entity, without additional queries to the database.
If not an entity-related event, the process-definition will be retrieved ... | [
"In",
"case",
"no",
"process",
"-",
"context",
"is",
"active",
"this",
"method",
"attempts",
"to",
"extract",
"a",
"process",
"-",
"definition",
"based",
"on",
"the",
"event",
".",
"In",
"case",
"it",
"s",
"an",
"event",
"related",
"to",
"an",
"entity",
... | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/delegate/event/impl/ActivitiEventDispatcherImpl.java#L98-L109 |
126,139 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java | BpmnDeploymentHelper.verifyProcessDefinitionsDoNotShareKeys | public void verifyProcessDefinitionsDoNotShareKeys(
Collection<ProcessDefinitionEntity> processDefinitions) {
Set<String> keySet = new LinkedHashSet<String>();
for (ProcessDefinitionEntity processDefinition : processDefinitions) {
if (keySet.contains(processDefinition.getKey())) {
throw new ... | java | public void verifyProcessDefinitionsDoNotShareKeys(
Collection<ProcessDefinitionEntity> processDefinitions) {
Set<String> keySet = new LinkedHashSet<String>();
for (ProcessDefinitionEntity processDefinition : processDefinitions) {
if (keySet.contains(processDefinition.getKey())) {
throw new ... | [
"public",
"void",
"verifyProcessDefinitionsDoNotShareKeys",
"(",
"Collection",
"<",
"ProcessDefinitionEntity",
">",
"processDefinitions",
")",
"{",
"Set",
"<",
"String",
">",
"keySet",
"=",
"new",
"LinkedHashSet",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"... | Verifies that no two process definitions share the same key, to prevent database unique
index violation.
@throws ActivitiException if any two processes have the same key | [
"Verifies",
"that",
"no",
"two",
"process",
"definitions",
"share",
"the",
"same",
"key",
"to",
"prevent",
"database",
"unique",
"index",
"violation",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java#L50-L60 |
126,140 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java | BpmnDeploymentHelper.copyDeploymentValuesToProcessDefinitions | public void copyDeploymentValuesToProcessDefinitions(DeploymentEntity deployment,
List<ProcessDefinitionEntity> processDefinitions) {
String engineVersion = deployment.getEngineVersion();
String tenantId = deployment.getTenantId();
String deploymentId = deployment.getId();
for (ProcessDefinition... | java | public void copyDeploymentValuesToProcessDefinitions(DeploymentEntity deployment,
List<ProcessDefinitionEntity> processDefinitions) {
String engineVersion = deployment.getEngineVersion();
String tenantId = deployment.getTenantId();
String deploymentId = deployment.getId();
for (ProcessDefinition... | [
"public",
"void",
"copyDeploymentValuesToProcessDefinitions",
"(",
"DeploymentEntity",
"deployment",
",",
"List",
"<",
"ProcessDefinitionEntity",
">",
"processDefinitions",
")",
"{",
"String",
"engineVersion",
"=",
"deployment",
".",
"getEngineVersion",
"(",
")",
";",
"... | Updates all the process definition entities to match the deployment's values for tenant,
engine version, and deployment id. | [
"Updates",
"all",
"the",
"process",
"definition",
"entities",
"to",
"match",
"the",
"deployment",
"s",
"values",
"for",
"tenant",
"engine",
"version",
"and",
"deployment",
"id",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java#L66-L86 |
126,141 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java | BpmnDeploymentHelper.setResourceNamesOnProcessDefinitions | public void setResourceNamesOnProcessDefinitions(ParsedDeployment parsedDeployment) {
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
String resourceName = parsedDeployment.getResourceForProcessDefinition(processDefinition).getName();
processDefinition.set... | java | public void setResourceNamesOnProcessDefinitions(ParsedDeployment parsedDeployment) {
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
String resourceName = parsedDeployment.getResourceForProcessDefinition(processDefinition).getName();
processDefinition.set... | [
"public",
"void",
"setResourceNamesOnProcessDefinitions",
"(",
"ParsedDeployment",
"parsedDeployment",
")",
"{",
"for",
"(",
"ProcessDefinitionEntity",
"processDefinition",
":",
"parsedDeployment",
".",
"getAllProcessDefinitions",
"(",
")",
")",
"{",
"String",
"resourceName... | Updates all the process definition entities to have the correct resource names. | [
"Updates",
"all",
"the",
"process",
"definition",
"entities",
"to",
"have",
"the",
"correct",
"resource",
"names",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java#L91-L96 |
126,142 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java | BpmnDeploymentHelper.getMostRecentVersionOfProcessDefinition | public ProcessDefinitionEntity getMostRecentVersionOfProcessDefinition(ProcessDefinitionEntity processDefinition) {
String key = processDefinition.getKey();
String tenantId = processDefinition.getTenantId();
ProcessDefinitionEntityManager processDefinitionManager
= Context.getCommandContext().getProc... | java | public ProcessDefinitionEntity getMostRecentVersionOfProcessDefinition(ProcessDefinitionEntity processDefinition) {
String key = processDefinition.getKey();
String tenantId = processDefinition.getTenantId();
ProcessDefinitionEntityManager processDefinitionManager
= Context.getCommandContext().getProc... | [
"public",
"ProcessDefinitionEntity",
"getMostRecentVersionOfProcessDefinition",
"(",
"ProcessDefinitionEntity",
"processDefinition",
")",
"{",
"String",
"key",
"=",
"processDefinition",
".",
"getKey",
"(",
")",
";",
"String",
"tenantId",
"=",
"processDefinition",
".",
"ge... | Gets the most recent persisted process definition that matches this one for tenant and key.
If none is found, returns null. This method assumes that the tenant and key are properly
set on the process definition entity. | [
"Gets",
"the",
"most",
"recent",
"persisted",
"process",
"definition",
"that",
"matches",
"this",
"one",
"for",
"tenant",
"and",
"key",
".",
"If",
"none",
"is",
"found",
"returns",
"null",
".",
"This",
"method",
"assumes",
"that",
"the",
"tenant",
"and",
"... | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java#L103-L118 |
126,143 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java | BpmnDeploymentHelper.updateTimersAndEvents | public void updateTimersAndEvents(ProcessDefinitionEntity processDefinition,
ProcessDefinitionEntity previousProcessDefinition, ParsedDeployment parsedDeployment) {
Process process = parsedDeployment.getProcessModelForProcessDefinition(processDefinition);
BpmnModel bpmnModel = parsedDeployment.getBp... | java | public void updateTimersAndEvents(ProcessDefinitionEntity processDefinition,
ProcessDefinitionEntity previousProcessDefinition, ParsedDeployment parsedDeployment) {
Process process = parsedDeployment.getProcessModelForProcessDefinition(processDefinition);
BpmnModel bpmnModel = parsedDeployment.getBp... | [
"public",
"void",
"updateTimersAndEvents",
"(",
"ProcessDefinitionEntity",
"processDefinition",
",",
"ProcessDefinitionEntity",
"previousProcessDefinition",
",",
"ParsedDeployment",
"parsedDeployment",
")",
"{",
"Process",
"process",
"=",
"parsedDeployment",
".",
"getProcessMod... | Updates all timers and events for the process definition. This removes obsolete message and signal
subscriptions and timers, and adds new ones. | [
"Updates",
"all",
"timers",
"and",
"events",
"for",
"the",
"process",
"definition",
".",
"This",
"removes",
"obsolete",
"message",
"and",
"signal",
"subscriptions",
"and",
"timers",
"and",
"adds",
"new",
"ones",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeploymentHelper.java#L148-L162 |
126,144 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ScopeUtil.java | ScopeUtil.createCopyOfSubProcessExecutionForCompensation | public static void createCopyOfSubProcessExecutionForCompensation(ExecutionEntity subProcessExecution) {
EventSubscriptionEntityManager eventSubscriptionEntityManager = Context.getCommandContext().getEventSubscriptionEntityManager();
List<EventSubscriptionEntity> eventSubscriptions = eventSubscriptionEntityMa... | java | public static void createCopyOfSubProcessExecutionForCompensation(ExecutionEntity subProcessExecution) {
EventSubscriptionEntityManager eventSubscriptionEntityManager = Context.getCommandContext().getEventSubscriptionEntityManager();
List<EventSubscriptionEntity> eventSubscriptions = eventSubscriptionEntityMa... | [
"public",
"static",
"void",
"createCopyOfSubProcessExecutionForCompensation",
"(",
"ExecutionEntity",
"subProcessExecution",
")",
"{",
"EventSubscriptionEntityManager",
"eventSubscriptionEntityManager",
"=",
"Context",
".",
"getCommandContext",
"(",
")",
".",
"getEventSubscriptio... | Creates a new event scope execution and moves existing event subscriptions to this new execution | [
"Creates",
"a",
"new",
"event",
"scope",
"execution",
"and",
"moves",
"existing",
"event",
"subscriptions",
"to",
"this",
"new",
"execution"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ScopeUtil.java#L75-L113 |
126,145 | Activiti/Activiti | activiti-spring/src/main/java/org/activiti/spring/autodeployment/AbstractAutoDeploymentStrategy.java | AbstractAutoDeploymentStrategy.determineResourceName | protected String determineResourceName(final Resource resource) {
String resourceName = null;
if (resource instanceof ContextResource) {
resourceName = ((ContextResource) resource).getPathWithinContext();
} else if (resource instanceof ByteArrayResource) {
resourceName ... | java | protected String determineResourceName(final Resource resource) {
String resourceName = null;
if (resource instanceof ContextResource) {
resourceName = ((ContextResource) resource).getPathWithinContext();
} else if (resource instanceof ByteArrayResource) {
resourceName ... | [
"protected",
"String",
"determineResourceName",
"(",
"final",
"Resource",
"resource",
")",
"{",
"String",
"resourceName",
"=",
"null",
";",
"if",
"(",
"resource",
"instanceof",
"ContextResource",
")",
"{",
"resourceName",
"=",
"(",
"(",
"ContextResource",
")",
"... | Determines the name to be used for the provided resource.
@param resource the resource to get the name for
@return the name of the resource | [
"Determines",
"the",
"name",
"to",
"be",
"used",
"for",
"the",
"provided",
"resource",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-spring/src/main/java/org/activiti/spring/autodeployment/AbstractAutoDeploymentStrategy.java#L58-L75 |
126,146 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/json/JSONArray.java | JSONArray.getJSONArray | public JSONArray getJSONArray(int index) throws JSONException {
Object o = get(index);
if (o instanceof JSONArray) {
return (JSONArray) o;
}
throw new JSONException("JSONArray[" + index + "] is not a JSONArray.");
} | java | public JSONArray getJSONArray(int index) throws JSONException {
Object o = get(index);
if (o instanceof JSONArray) {
return (JSONArray) o;
}
throw new JSONException("JSONArray[" + index + "] is not a JSONArray.");
} | [
"public",
"JSONArray",
"getJSONArray",
"(",
"int",
"index",
")",
"throws",
"JSONException",
"{",
"Object",
"o",
"=",
"get",
"(",
"index",
")",
";",
"if",
"(",
"o",
"instanceof",
"JSONArray",
")",
"{",
"return",
"(",
"JSONArray",
")",
"o",
";",
"}",
"th... | Get the JSONArray associated with an index.
@param index
The index must be between 0 and length() - 1.
@return A JSONArray value.
@throws JSONException
If there is no value for the index. or if the value is not a JSONArray | [
"Get",
"the",
"JSONArray",
"associated",
"with",
"an",
"index",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/json/JSONArray.java#L256-L262 |
126,147 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/ProcessEngines.java | ProcessEngines.destroy | public synchronized static void destroy() {
if (isInitialized()) {
Map<String, ProcessEngine> engines = new HashMap<String, ProcessEngine>(processEngines);
processEngines = new HashMap<String, ProcessEngine>();
for (String processEngineName : engines.keySet()) {
ProcessEngine processEngin... | java | public synchronized static void destroy() {
if (isInitialized()) {
Map<String, ProcessEngine> engines = new HashMap<String, ProcessEngine>(processEngines);
processEngines = new HashMap<String, ProcessEngine>();
for (String processEngineName : engines.keySet()) {
ProcessEngine processEngin... | [
"public",
"synchronized",
"static",
"void",
"destroy",
"(",
")",
"{",
"if",
"(",
"isInitialized",
"(",
")",
")",
"{",
"Map",
"<",
"String",
",",
"ProcessEngine",
">",
"engines",
"=",
"new",
"HashMap",
"<",
"String",
",",
"ProcessEngine",
">",
"(",
"proce... | closes all process engines. This method should be called when the server shuts down. | [
"closes",
"all",
"process",
"engines",
".",
"This",
"method",
"should",
"be",
"called",
"when",
"the",
"server",
"shuts",
"down",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/ProcessEngines.java#L250-L270 |
126,148 | Activiti/Activiti | activiti-bpmn-converter/src/main/java/org/activiti/bpmn/converter/IndentingXMLStreamWriter.java | IndentingXMLStreamWriter.setIndentStep | public void setIndentStep(int indentStep) {
StringBuilder s = new StringBuilder();
for (; indentStep > 0; indentStep--)
s.append(' ');
setIndentStep(s.toString());
} | java | public void setIndentStep(int indentStep) {
StringBuilder s = new StringBuilder();
for (; indentStep > 0; indentStep--)
s.append(' ');
setIndentStep(s.toString());
} | [
"public",
"void",
"setIndentStep",
"(",
"int",
"indentStep",
")",
"{",
"StringBuilder",
"s",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
";",
"indentStep",
">",
"0",
";",
"indentStep",
"--",
")",
"s",
".",
"append",
"(",
"'",
"'",
")",
";... | Set the current indent step.
@param indentStep
The new indent step (0 or less for no indentation).
@see #getIndentStep()
@deprecated Should use the version that takes string. | [
"Set",
"the",
"current",
"indent",
"step",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-converter/src/main/java/org/activiti/bpmn/converter/IndentingXMLStreamWriter.java#L64-L69 |
126,149 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java | BpmnDeployer.setProcessDefinitionDiagramNames | protected void setProcessDefinitionDiagramNames(ParsedDeployment parsedDeployment) {
Map<String, ResourceEntity> resources = parsedDeployment.getDeployment().getResources();
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
String diagramResourc... | java | protected void setProcessDefinitionDiagramNames(ParsedDeployment parsedDeployment) {
Map<String, ResourceEntity> resources = parsedDeployment.getDeployment().getResources();
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
String diagramResourc... | [
"protected",
"void",
"setProcessDefinitionDiagramNames",
"(",
"ParsedDeployment",
"parsedDeployment",
")",
"{",
"Map",
"<",
"String",
",",
"ResourceEntity",
">",
"resources",
"=",
"parsedDeployment",
".",
"getDeployment",
"(",
")",
".",
"getResources",
"(",
")",
";"... | Updates all the process definition entities to have the correct diagram resource name. Must
be called after createAndPersistNewDiagramsAsNeeded to ensure that any newly-created diagrams
already have their resources attached to the deployment. | [
"Updates",
"all",
"the",
"process",
"definition",
"entities",
"to",
"have",
"the",
"correct",
"diagram",
"resource",
"name",
".",
"Must",
"be",
"called",
"after",
"createAndPersistNewDiagramsAsNeeded",
"to",
"ensure",
"that",
"any",
"newly",
"-",
"created",
"diagr... | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java#L131-L139 |
126,150 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java | BpmnDeployer.getPreviousVersionsOfProcessDefinitions | protected Map<ProcessDefinitionEntity, ProcessDefinitionEntity> getPreviousVersionsOfProcessDefinitions(
ParsedDeployment parsedDeployment) {
Map<ProcessDefinitionEntity, ProcessDefinitionEntity> result = new LinkedHashMap<ProcessDefinitionEntity, ProcessDefinitionEntity>();
for (ProcessDe... | java | protected Map<ProcessDefinitionEntity, ProcessDefinitionEntity> getPreviousVersionsOfProcessDefinitions(
ParsedDeployment parsedDeployment) {
Map<ProcessDefinitionEntity, ProcessDefinitionEntity> result = new LinkedHashMap<ProcessDefinitionEntity, ProcessDefinitionEntity>();
for (ProcessDe... | [
"protected",
"Map",
"<",
"ProcessDefinitionEntity",
",",
"ProcessDefinitionEntity",
">",
"getPreviousVersionsOfProcessDefinitions",
"(",
"ParsedDeployment",
"parsedDeployment",
")",
"{",
"Map",
"<",
"ProcessDefinitionEntity",
",",
"ProcessDefinitionEntity",
">",
"result",
"="... | Constructs a map from new ProcessDefinitionEntities to the previous version by key and tenant.
If no previous version exists, no map entry is created. | [
"Constructs",
"a",
"map",
"from",
"new",
"ProcessDefinitionEntities",
"to",
"the",
"previous",
"version",
"by",
"key",
"and",
"tenant",
".",
"If",
"no",
"previous",
"version",
"exists",
"no",
"map",
"entry",
"is",
"created",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java#L145-L160 |
126,151 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java | BpmnDeployer.setProcessDefinitionVersionsAndIds | protected void setProcessDefinitionVersionsAndIds(ParsedDeployment parsedDeployment,
Map<ProcessDefinitionEntity, ProcessDefinitionEntity> mapNewToOldProcessDefinitions) {
CommandContext commandContext = Context.getCommandContext();
for (ProcessDefi... | java | protected void setProcessDefinitionVersionsAndIds(ParsedDeployment parsedDeployment,
Map<ProcessDefinitionEntity, ProcessDefinitionEntity> mapNewToOldProcessDefinitions) {
CommandContext commandContext = Context.getCommandContext();
for (ProcessDefi... | [
"protected",
"void",
"setProcessDefinitionVersionsAndIds",
"(",
"ParsedDeployment",
"parsedDeployment",
",",
"Map",
"<",
"ProcessDefinitionEntity",
",",
"ProcessDefinitionEntity",
">",
"mapNewToOldProcessDefinitions",
")",
"{",
"CommandContext",
"commandContext",
"=",
"Context"... | Sets the version on each process definition entity, and the identifier. If the map contains
an older version for a process definition, then the version is set to that older entity's
version plus one; otherwise it is set to 1. Also dispatches an ENTITY_CREATED event. | [
"Sets",
"the",
"version",
"on",
"each",
"process",
"definition",
"entity",
"and",
"the",
"identifier",
".",
"If",
"the",
"map",
"contains",
"an",
"older",
"version",
"for",
"a",
"process",
"definition",
"then",
"the",
"version",
"is",
"set",
"to",
"that",
... | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java#L167-L187 |
126,152 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java | BpmnDeployer.persistProcessDefinitionsAndAuthorizations | protected void persistProcessDefinitionsAndAuthorizations(ParsedDeployment parsedDeployment) {
CommandContext commandContext = Context.getCommandContext();
ProcessDefinitionEntityManager processDefinitionManager = commandContext.getProcessDefinitionEntityManager();
for (ProcessDefinitionEntity ... | java | protected void persistProcessDefinitionsAndAuthorizations(ParsedDeployment parsedDeployment) {
CommandContext commandContext = Context.getCommandContext();
ProcessDefinitionEntityManager processDefinitionManager = commandContext.getProcessDefinitionEntityManager();
for (ProcessDefinitionEntity ... | [
"protected",
"void",
"persistProcessDefinitionsAndAuthorizations",
"(",
"ParsedDeployment",
"parsedDeployment",
")",
"{",
"CommandContext",
"commandContext",
"=",
"Context",
".",
"getCommandContext",
"(",
")",
";",
"ProcessDefinitionEntityManager",
"processDefinitionManager",
"... | Saves each process definition. It is assumed that the deployment is new, the definitions
have never been saved before, and that they have all their values properly set up. | [
"Saves",
"each",
"process",
"definition",
".",
"It",
"is",
"assumed",
"that",
"the",
"deployment",
"is",
"new",
"the",
"definitions",
"have",
"never",
"been",
"saved",
"before",
"and",
"that",
"they",
"have",
"all",
"their",
"values",
"properly",
"set",
"up"... | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java#L193-L203 |
126,153 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java | BpmnDeployer.makeProcessDefinitionsConsistentWithPersistedVersions | protected void makeProcessDefinitionsConsistentWithPersistedVersions(ParsedDeployment parsedDeployment) {
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
ProcessDefinitionEntity persistedProcessDefinition =
bpmnDeploymentHelper.getP... | java | protected void makeProcessDefinitionsConsistentWithPersistedVersions(ParsedDeployment parsedDeployment) {
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) {
ProcessDefinitionEntity persistedProcessDefinition =
bpmnDeploymentHelper.getP... | [
"protected",
"void",
"makeProcessDefinitionsConsistentWithPersistedVersions",
"(",
"ParsedDeployment",
"parsedDeployment",
")",
"{",
"for",
"(",
"ProcessDefinitionEntity",
"processDefinition",
":",
"parsedDeployment",
".",
"getAllProcessDefinitions",
"(",
")",
")",
"{",
"Proc... | Loads the persisted version of each process definition and set values on the in-memory
version to be consistent. | [
"Loads",
"the",
"persisted",
"version",
"of",
"each",
"process",
"definition",
"and",
"set",
"values",
"on",
"the",
"in",
"-",
"memory",
"version",
"to",
"be",
"consistent",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java#L250-L261 |
126,154 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/ReflectUtil.java | ReflectUtil.getField | public static Field getField(String fieldName, Object object) {
return getField(fieldName, object.getClass());
} | java | public static Field getField(String fieldName, Object object) {
return getField(fieldName, object.getClass());
} | [
"public",
"static",
"Field",
"getField",
"(",
"String",
"fieldName",
",",
"Object",
"object",
")",
"{",
"return",
"getField",
"(",
"fieldName",
",",
"object",
".",
"getClass",
"(",
")",
")",
";",
"}"
] | Returns the field of the given object or null if it doesn't exist. | [
"Returns",
"the",
"field",
"of",
"the",
"given",
"object",
"or",
"null",
"if",
"it",
"doesn",
"t",
"exist",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/ReflectUtil.java#L155-L157 |
126,155 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/ReflectUtil.java | ReflectUtil.getField | public static Field getField(String fieldName, Class<?> clazz) {
Field field = null;
try {
field = clazz.getDeclaredField(fieldName);
} catch (SecurityException e) {
throw new ActivitiException("not allowed to access field " + field + " on class " + clazz.getCanonicalName());
} catch (NoSuch... | java | public static Field getField(String fieldName, Class<?> clazz) {
Field field = null;
try {
field = clazz.getDeclaredField(fieldName);
} catch (SecurityException e) {
throw new ActivitiException("not allowed to access field " + field + " on class " + clazz.getCanonicalName());
} catch (NoSuch... | [
"public",
"static",
"Field",
"getField",
"(",
"String",
"fieldName",
",",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"Field",
"field",
"=",
"null",
";",
"try",
"{",
"field",
"=",
"clazz",
".",
"getDeclaredField",
"(",
"fieldName",
")",
";",
"}",
"catch... | Returns the field of the given class or null if it doesn't exist. | [
"Returns",
"the",
"field",
"of",
"the",
"given",
"class",
"or",
"null",
"if",
"it",
"doesn",
"t",
"exist",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/ReflectUtil.java#L162-L177 |
126,156 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/json/CDL.java | CDL.getValue | private static String getValue(JSONTokener x) throws JSONException {
char c;
char q;
StringBuffer sb;
do {
c = x.next();
} while (c == ' ' || c == '\t');
switch (c) {
case 0:
return null;
case '"':
case '\'':
q = c;
sb = new StringBuffer();
for (;;) {
... | java | private static String getValue(JSONTokener x) throws JSONException {
char c;
char q;
StringBuffer sb;
do {
c = x.next();
} while (c == ' ' || c == '\t');
switch (c) {
case 0:
return null;
case '"':
case '\'':
q = c;
sb = new StringBuffer();
for (;;) {
... | [
"private",
"static",
"String",
"getValue",
"(",
"JSONTokener",
"x",
")",
"throws",
"JSONException",
"{",
"char",
"c",
";",
"char",
"q",
";",
"StringBuffer",
"sb",
";",
"do",
"{",
"c",
"=",
"x",
".",
"next",
"(",
")",
";",
"}",
"while",
"(",
"c",
"=... | Get the next value. The value can be wrapped in quotes. The value can be empty.
@param x
A JSONTokener of the source text.
@return The value string, or null if empty.
@throws JSONException
if the quoted string is badly formed. | [
"Get",
"the",
"next",
"value",
".",
"The",
"value",
"can",
"be",
"wrapped",
"in",
"quotes",
".",
"The",
"value",
"can",
"be",
"empty",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/json/CDL.java#L52-L84 |
126,157 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/json/CDL.java | CDL.rowToJSONArray | public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException {
JSONArray ja = new JSONArray();
for (;;) {
String value = getValue(x);
char c = x.next();
if (value == null || (ja.length() == 0 && value.length() == 0 && c != ',')) {
return null;
}
ja.put(value);... | java | public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException {
JSONArray ja = new JSONArray();
for (;;) {
String value = getValue(x);
char c = x.next();
if (value == null || (ja.length() == 0 && value.length() == 0 && c != ',')) {
return null;
}
ja.put(value);... | [
"public",
"static",
"JSONArray",
"rowToJSONArray",
"(",
"JSONTokener",
"x",
")",
"throws",
"JSONException",
"{",
"JSONArray",
"ja",
"=",
"new",
"JSONArray",
"(",
")",
";",
"for",
"(",
";",
";",
")",
"{",
"String",
"value",
"=",
"getValue",
"(",
"x",
")",... | Produce a JSONArray of strings from a row of comma delimited values.
@param x
A JSONTokener of the source text.
@return A JSONArray of strings.
@throws JSONException | [
"Produce",
"a",
"JSONArray",
"of",
"strings",
"from",
"a",
"row",
"of",
"comma",
"delimited",
"values",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/json/CDL.java#L94-L116 |
126,158 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/json/CDL.java | CDL.rowToJSONObject | public static JSONObject rowToJSONObject(JSONArray names, JSONTokener x) throws JSONException {
JSONArray ja = rowToJSONArray(x);
return ja != null ? ja.toJSONObject(names) : null;
} | java | public static JSONObject rowToJSONObject(JSONArray names, JSONTokener x) throws JSONException {
JSONArray ja = rowToJSONArray(x);
return ja != null ? ja.toJSONObject(names) : null;
} | [
"public",
"static",
"JSONObject",
"rowToJSONObject",
"(",
"JSONArray",
"names",
",",
"JSONTokener",
"x",
")",
"throws",
"JSONException",
"{",
"JSONArray",
"ja",
"=",
"rowToJSONArray",
"(",
"x",
")",
";",
"return",
"ja",
"!=",
"null",
"?",
"ja",
".",
"toJSONO... | Produce a JSONObject from a row of comma delimited text, using a parallel JSONArray of strings to provides the names of the elements.
@param names
A JSONArray of names. This is commonly obtained from the first row of a comma delimited text file using the rowToJSONArray method.
@param x
A JSONTokener of the source text... | [
"Produce",
"a",
"JSONObject",
"from",
"a",
"row",
"of",
"comma",
"delimited",
"text",
"using",
"a",
"parallel",
"JSONArray",
"of",
"strings",
"to",
"provides",
"the",
"names",
"of",
"the",
"elements",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/json/CDL.java#L128-L131 |
126,159 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/IdentityLinkEntityManagerImpl.java | IdentityLinkEntityManagerImpl.involveUser | @Override
public IdentityLinkEntity involveUser(ExecutionEntity executionEntity, String userId, String type) {
for (IdentityLinkEntity identityLink : executionEntity.getIdentityLinks()) {
if (identityLink.isUser() && identityLink.getUserId().equals(userId)) {
return identityLink;
}
}
r... | java | @Override
public IdentityLinkEntity involveUser(ExecutionEntity executionEntity, String userId, String type) {
for (IdentityLinkEntity identityLink : executionEntity.getIdentityLinks()) {
if (identityLink.isUser() && identityLink.getUserId().equals(userId)) {
return identityLink;
}
}
r... | [
"@",
"Override",
"public",
"IdentityLinkEntity",
"involveUser",
"(",
"ExecutionEntity",
"executionEntity",
",",
"String",
"userId",
",",
"String",
"type",
")",
"{",
"for",
"(",
"IdentityLinkEntity",
"identityLink",
":",
"executionEntity",
".",
"getIdentityLinks",
"(",... | Adds an IdentityLink for the given user id with the specified type,
but only if the user is not associated with the execution entity yet. | [
"Adds",
"an",
"IdentityLink",
"for",
"the",
"given",
"user",
"id",
"with",
"the",
"specified",
"type",
"but",
"only",
"if",
"the",
"user",
"is",
"not",
"associated",
"with",
"the",
"execution",
"entity",
"yet",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/IdentityLinkEntityManagerImpl.java#L152-L160 |
126,160 | Activiti/Activiti | activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java | DefaultProcessDiagramCanvas.createShape | private static Shape createShape(SHAPE_TYPE shapeType,
GraphicInfo graphicInfo) {
if (SHAPE_TYPE.Rectangle.equals(shapeType)) {
// source is rectangle
return new Rectangle2D.Double(graphicInfo.getX(),
graphicI... | java | private static Shape createShape(SHAPE_TYPE shapeType,
GraphicInfo graphicInfo) {
if (SHAPE_TYPE.Rectangle.equals(shapeType)) {
// source is rectangle
return new Rectangle2D.Double(graphicInfo.getX(),
graphicI... | [
"private",
"static",
"Shape",
"createShape",
"(",
"SHAPE_TYPE",
"shapeType",
",",
"GraphicInfo",
"graphicInfo",
")",
"{",
"if",
"(",
"SHAPE_TYPE",
".",
"Rectangle",
".",
"equals",
"(",
"shapeType",
")",
")",
"{",
"// source is rectangle",
"return",
"new",
"Recta... | This method creates shape by type and coordinates.
@param shapeType
@param graphicInfo
@return Shape | [
"This",
"method",
"creates",
"shape",
"by",
"type",
"and",
"coordinates",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java#L1783-L1815 |
126,161 | Activiti/Activiti | activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java | DefaultProcessDiagramCanvas.getIntersection | private static Point getIntersection(Shape shape,
Line2D.Double line) {
if (shape instanceof Ellipse2D) {
return getEllipseIntersection(shape,
line);
} else if (shape instanceof Rectangle2D || shape instanceof... | java | private static Point getIntersection(Shape shape,
Line2D.Double line) {
if (shape instanceof Ellipse2D) {
return getEllipseIntersection(shape,
line);
} else if (shape instanceof Rectangle2D || shape instanceof... | [
"private",
"static",
"Point",
"getIntersection",
"(",
"Shape",
"shape",
",",
"Line2D",
".",
"Double",
"line",
")",
"{",
"if",
"(",
"shape",
"instanceof",
"Ellipse2D",
")",
"{",
"return",
"getEllipseIntersection",
"(",
"shape",
",",
"line",
")",
";",
"}",
"... | This method returns intersection point of shape border and line.
@param shape
@param line
@return Point | [
"This",
"method",
"returns",
"intersection",
"point",
"of",
"shape",
"border",
"and",
"line",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java#L1823-L1835 |
126,162 | Activiti/Activiti | activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java | DefaultProcessDiagramCanvas.getEllipseIntersection | private static Point getEllipseIntersection(Shape shape,
Line2D.Double line) {
double angle = Math.atan2(line.y2 - line.y1,
line.x2 - line.x1);
double x = shape.getBounds2D().getWidth() / 2 * Math.cos(angle) + shape.getBou... | java | private static Point getEllipseIntersection(Shape shape,
Line2D.Double line) {
double angle = Math.atan2(line.y2 - line.y1,
line.x2 - line.x1);
double x = shape.getBounds2D().getWidth() / 2 * Math.cos(angle) + shape.getBou... | [
"private",
"static",
"Point",
"getEllipseIntersection",
"(",
"Shape",
"shape",
",",
"Line2D",
".",
"Double",
"line",
")",
"{",
"double",
"angle",
"=",
"Math",
".",
"atan2",
"(",
"line",
".",
"y2",
"-",
"line",
".",
"y1",
",",
"line",
".",
"x2",
"-",
... | This method calculates ellipse intersection with line
@param shape Bounds of this shape used to calculate parameters of inscribed into this bounds ellipse.
@param line
@return Intersection point | [
"This",
"method",
"calculates",
"ellipse",
"intersection",
"with",
"line"
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java#L1843-L1853 |
126,163 | Activiti/Activiti | activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java | DefaultProcessDiagramCanvas.getShapeIntersection | private static Point getShapeIntersection(Shape shape,
Line2D.Double line) {
PathIterator it = shape.getPathIterator(null);
double[] coords = new double[6];
double[] pos = new double[2];
Line2D.Double l = new Line2D.Double();
while (!... | java | private static Point getShapeIntersection(Shape shape,
Line2D.Double line) {
PathIterator it = shape.getPathIterator(null);
double[] coords = new double[6];
double[] pos = new double[2];
Line2D.Double l = new Line2D.Double();
while (!... | [
"private",
"static",
"Point",
"getShapeIntersection",
"(",
"Shape",
"shape",
",",
"Line2D",
".",
"Double",
"line",
")",
"{",
"PathIterator",
"it",
"=",
"shape",
".",
"getPathIterator",
"(",
"null",
")",
";",
"double",
"[",
"]",
"coords",
"=",
"new",
"doubl... | This method calculates shape intersection with line.
@param shape
@param line
@return Intersection point | [
"This",
"method",
"calculates",
"shape",
"intersection",
"with",
"line",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java#L1861-L1894 |
126,164 | Activiti/Activiti | activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java | DefaultProcessDiagramCanvas.getLinesIntersection | private static Point getLinesIntersection(Line2D a,
Line2D b) {
double d = (a.getX1() - a.getX2()) * (b.getY2() - b.getY1()) - (a.getY1() - a.getY2()) * (b.getX2() - b.getX1());
double da = (a.getX1() - b.getX1()) * (b.getY2() - b.getY1()) - (a.getY1() - b.g... | java | private static Point getLinesIntersection(Line2D a,
Line2D b) {
double d = (a.getX1() - a.getX2()) * (b.getY2() - b.getY1()) - (a.getY1() - a.getY2()) * (b.getX2() - b.getX1());
double da = (a.getX1() - b.getX1()) * (b.getY2() - b.getY1()) - (a.getY1() - b.g... | [
"private",
"static",
"Point",
"getLinesIntersection",
"(",
"Line2D",
"a",
",",
"Line2D",
"b",
")",
"{",
"double",
"d",
"=",
"(",
"a",
".",
"getX1",
"(",
")",
"-",
"a",
".",
"getX2",
"(",
")",
")",
"*",
"(",
"b",
".",
"getY2",
"(",
")",
"-",
"b"... | This method calculates intersections of two lines.
@param a Line 1
@param b Line 2
@return Intersection point | [
"This",
"method",
"calculates",
"intersections",
"of",
"two",
"lines",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-image-generator/src/main/java/org/activiti/image/impl/DefaultProcessDiagramCanvas.java#L1902-L1911 |
126,165 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/SequentialMultiInstanceBehavior.java | SequentialMultiInstanceBehavior.createInstances | protected int createInstances(DelegateExecution multiInstanceExecution) {
int nrOfInstances = resolveNrOfInstances(multiInstanceExecution);
if (nrOfInstances == 0) {
return nrOfInstances;
} else if (nrOfInstances < 0) {
throw new ActivitiIllegalArgumentException("Invalid number of instances... | java | protected int createInstances(DelegateExecution multiInstanceExecution) {
int nrOfInstances = resolveNrOfInstances(multiInstanceExecution);
if (nrOfInstances == 0) {
return nrOfInstances;
} else if (nrOfInstances < 0) {
throw new ActivitiIllegalArgumentException("Invalid number of instances... | [
"protected",
"int",
"createInstances",
"(",
"DelegateExecution",
"multiInstanceExecution",
")",
"{",
"int",
"nrOfInstances",
"=",
"resolveNrOfInstances",
"(",
"multiInstanceExecution",
")",
";",
"if",
"(",
"nrOfInstances",
"==",
"0",
")",
"{",
"return",
"nrOfInstances... | Handles the sequential case of spawning the instances. Will only create one instance, since at most one instance can be active. | [
"Handles",
"the",
"sequential",
"case",
"of",
"spawning",
"the",
"instances",
".",
"Will",
"only",
"create",
"one",
"instance",
"since",
"at",
"most",
"one",
"instance",
"can",
"be",
"active",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/SequentialMultiInstanceBehavior.java#L41-L68 |
126,166 | Activiti/Activiti | activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/DefaultServiceTaskBehavior.java | DefaultServiceTaskBehavior.execute | @Override
public void execute(DelegateExecution execution) {
ActionDefinition actionDefinition = findRelatedActionDefinition(execution);
Connector connector = getConnector(getImplementation(execution));
IntegrationContext integrationContext = connector.apply(integrationContextBuilder.from(e... | java | @Override
public void execute(DelegateExecution execution) {
ActionDefinition actionDefinition = findRelatedActionDefinition(execution);
Connector connector = getConnector(getImplementation(execution));
IntegrationContext integrationContext = connector.apply(integrationContextBuilder.from(e... | [
"@",
"Override",
"public",
"void",
"execute",
"(",
"DelegateExecution",
"execution",
")",
"{",
"ActionDefinition",
"actionDefinition",
"=",
"findRelatedActionDefinition",
"(",
"execution",
")",
";",
"Connector",
"connector",
"=",
"getConnector",
"(",
"getImplementation"... | We have two different implementation strategy that can be executed
in according if we have a connector action definition match or not. | [
"We",
"have",
"two",
"different",
"implementation",
"strategy",
"that",
"can",
"be",
"executed",
"in",
"according",
"if",
"we",
"have",
"a",
"connector",
"action",
"definition",
"match",
"or",
"not",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-api-impl/activiti-api-process-runtime-impl/src/main/java/org/activiti/runtime/api/connector/DefaultServiceTaskBehavior.java#L50-L62 |
126,167 | Activiti/Activiti | activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BPMNLayout.java | BPMNLayout.moveNode | protected void moveNode(TreeNode node, double dx, double dy) {
node.x += dx;
node.y += dy;
apply(node, null);
TreeNode child = node.child;
while (child != null) {
moveNode(child, dx, dy);
child = child.next;
}
} | java | protected void moveNode(TreeNode node, double dx, double dy) {
node.x += dx;
node.y += dy;
apply(node, null);
TreeNode child = node.child;
while (child != null) {
moveNode(child, dx, dy);
child = child.next;
}
} | [
"protected",
"void",
"moveNode",
"(",
"TreeNode",
"node",
",",
"double",
"dx",
",",
"double",
"dy",
")",
"{",
"node",
".",
"x",
"+=",
"dx",
";",
"node",
".",
"y",
"+=",
"dy",
";",
"apply",
"(",
"node",
",",
"null",
")",
";",
"TreeNode",
"child",
... | Moves the specified node and all of its children by the given amount. | [
"Moves",
"the",
"specified",
"node",
"and",
"all",
"of",
"its",
"children",
"by",
"the",
"given",
"amount",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BPMNLayout.java#L325-L336 |
126,168 | Activiti/Activiti | activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BPMNLayout.java | BPMNLayout.dfs | protected TreeNode dfs(Object cell, Object parent, Set<Object> visited) {
if (visited == null) {
visited = new HashSet<Object>();
}
TreeNode node = null;
mxIGraphModel model = graph.getModel();
if (cell != null && !visited.contains(cell) && (!isVertexIgnored(cell) || isBoundaryEvent(... | java | protected TreeNode dfs(Object cell, Object parent, Set<Object> visited) {
if (visited == null) {
visited = new HashSet<Object>();
}
TreeNode node = null;
mxIGraphModel model = graph.getModel();
if (cell != null && !visited.contains(cell) && (!isVertexIgnored(cell) || isBoundaryEvent(... | [
"protected",
"TreeNode",
"dfs",
"(",
"Object",
"cell",
",",
"Object",
"parent",
",",
"Set",
"<",
"Object",
">",
"visited",
")",
"{",
"if",
"(",
"visited",
"==",
"null",
")",
"{",
"visited",
"=",
"new",
"HashSet",
"<",
"Object",
">",
"(",
")",
";",
... | Does a depth first search starting at the specified cell. Makes sure the specified swimlane is never left by the algorithm. | [
"Does",
"a",
"depth",
"first",
"search",
"starting",
"at",
"the",
"specified",
"cell",
".",
"Makes",
"sure",
"the",
"specified",
"swimlane",
"is",
"never",
"left",
"by",
"the",
"algorithm",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BPMNLayout.java#L341-L383 |
126,169 | Activiti/Activiti | activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BPMNLayout.java | BPMNLayout.layout | protected void layout(TreeNode node) {
if (node != null) {
TreeNode child = node.child;
while (child != null) {
layout(child);
child = child.next;
}
if (node.child != null) {
attachParent(node, join(node));
} else {
layoutLeaf(node);
... | java | protected void layout(TreeNode node) {
if (node != null) {
TreeNode child = node.child;
while (child != null) {
layout(child);
child = child.next;
}
if (node.child != null) {
attachParent(node, join(node));
} else {
layoutLeaf(node);
... | [
"protected",
"void",
"layout",
"(",
"TreeNode",
"node",
")",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"TreeNode",
"child",
"=",
"node",
".",
"child",
";",
"while",
"(",
"child",
"!=",
"null",
")",
"{",
"layout",
"(",
"child",
")",
";",
"chil... | Starts the actual compact tree layout algorithm at the given node. | [
"Starts",
"the",
"actual",
"compact",
"tree",
"layout",
"algorithm",
"at",
"the",
"given",
"node",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-bpmn-layout/src/main/java/org/activiti/bpmn/BPMNLayout.java#L388-L403 |
126,170 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/ParallelMultiInstanceBehavior.java | ParallelMultiInstanceBehavior.createInstances | protected int createInstances(DelegateExecution execution) {
int nrOfInstances = resolveNrOfInstances(execution);
if (nrOfInstances < 0) {
throw new ActivitiIllegalArgumentException("Invalid number of instances: must be non-negative integer value" + ", but was " + nrOfInstances);
}
execution.setM... | java | protected int createInstances(DelegateExecution execution) {
int nrOfInstances = resolveNrOfInstances(execution);
if (nrOfInstances < 0) {
throw new ActivitiIllegalArgumentException("Invalid number of instances: must be non-negative integer value" + ", but was " + nrOfInstances);
}
execution.setM... | [
"protected",
"int",
"createInstances",
"(",
"DelegateExecution",
"execution",
")",
"{",
"int",
"nrOfInstances",
"=",
"resolveNrOfInstances",
"(",
"execution",
")",
";",
"if",
"(",
"nrOfInstances",
"<",
"0",
")",
"{",
"throw",
"new",
"ActivitiIllegalArgumentException... | Handles the parallel case of spawning the instances. Will create child executions accordingly for every instance needed. | [
"Handles",
"the",
"parallel",
"case",
"of",
"spawning",
"the",
"instances",
".",
"Will",
"create",
"child",
"executions",
"accordingly",
"for",
"every",
"instance",
"needed",
"."
] | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/ParallelMultiInstanceBehavior.java#L52-L99 |
126,171 | Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/CachingAndArtifactsManager.java | CachingAndArtifactsManager.updateCachingAndArtifacts | public void updateCachingAndArtifacts(ParsedDeployment parsedDeployment) {
CommandContext commandContext = Context.getCommandContext();
final ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
DeploymentCache<ProcessDefinitionCacheEntry> processDefinitionCac... | java | public void updateCachingAndArtifacts(ParsedDeployment parsedDeployment) {
CommandContext commandContext = Context.getCommandContext();
final ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
DeploymentCache<ProcessDefinitionCacheEntry> processDefinitionCac... | [
"public",
"void",
"updateCachingAndArtifacts",
"(",
"ParsedDeployment",
"parsedDeployment",
")",
"{",
"CommandContext",
"commandContext",
"=",
"Context",
".",
"getCommandContext",
"(",
")",
";",
"final",
"ProcessEngineConfigurationImpl",
"processEngineConfiguration",
"=",
"... | Ensures that the process definition is cached in the appropriate places, including the
deployment's collection of deployed artifacts and the deployment manager's cache, as well
as caching any ProcessDefinitionInfos. | [
"Ensures",
"that",
"the",
"process",
"definition",
"is",
"cached",
"in",
"the",
"appropriate",
"places",
"including",
"the",
"deployment",
"s",
"collection",
"of",
"deployed",
"artifacts",
"and",
"the",
"deployment",
"manager",
"s",
"cache",
"as",
"well",
"as",
... | 82e2b2cd2083b2f734ca0efc7815389c0f2517d9 | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/CachingAndArtifactsManager.java#L44-L61 |
126,172 | alibaba/ARouter | arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/utils/Logger.java | Logger.info | public void info(CharSequence info) {
if (StringUtils.isNotEmpty(info)) {
msg.printMessage(Diagnostic.Kind.NOTE, Consts.PREFIX_OF_LOGGER + info);
}
} | java | public void info(CharSequence info) {
if (StringUtils.isNotEmpty(info)) {
msg.printMessage(Diagnostic.Kind.NOTE, Consts.PREFIX_OF_LOGGER + info);
}
} | [
"public",
"void",
"info",
"(",
"CharSequence",
"info",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isNotEmpty",
"(",
"info",
")",
")",
"{",
"msg",
".",
"printMessage",
"(",
"Diagnostic",
".",
"Kind",
".",
"NOTE",
",",
"Consts",
".",
"PREFIX_OF_LOGGER",
"+"... | Print info log. | [
"Print",
"info",
"log",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/utils/Logger.java#L25-L29 |
126,173 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/utils/ClassUtils.java | ClassUtils.isVMMultidexCapable | private static boolean isVMMultidexCapable() {
boolean isMultidexCapable = false;
String vmName = null;
try {
if (isYunOS()) { // YunOS需要特殊判断
vmName = "'YunOS'";
isMultidexCapable = Integer.valueOf(System.getProperty("ro.build.version.sdk")) >= 21;... | java | private static boolean isVMMultidexCapable() {
boolean isMultidexCapable = false;
String vmName = null;
try {
if (isYunOS()) { // YunOS需要特殊判断
vmName = "'YunOS'";
isMultidexCapable = Integer.valueOf(System.getProperty("ro.build.version.sdk")) >= 21;... | [
"private",
"static",
"boolean",
"isVMMultidexCapable",
"(",
")",
"{",
"boolean",
"isMultidexCapable",
"=",
"false",
";",
"String",
"vmName",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"isYunOS",
"(",
")",
")",
"{",
"// YunOS需要特殊判断",
"vmName",
"=",
"\"'YunOS'\"... | Identifies if the current VM has a native support for multidex, meaning there is no need for
additional installation by this library.
@return true if the VM handles multidex | [
"Identifies",
"if",
"the",
"current",
"VM",
"has",
"a",
"native",
"support",
"for",
"multidex",
"meaning",
"there",
"is",
"no",
"need",
"for",
"additional",
"installation",
"by",
"this",
"library",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/utils/ClassUtils.java#L195-L227 |
126,174 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java | _ARouter.destroy | static synchronized void destroy() {
if (debuggable()) {
hasInit = false;
LogisticsCenter.suspend();
logger.info(Consts.TAG, "ARouter destroy success!");
} else {
logger.error(Consts.TAG, "Destroy can be used in debug mode only!");
}
} | java | static synchronized void destroy() {
if (debuggable()) {
hasInit = false;
LogisticsCenter.suspend();
logger.info(Consts.TAG, "ARouter destroy success!");
} else {
logger.error(Consts.TAG, "Destroy can be used in debug mode only!");
}
} | [
"static",
"synchronized",
"void",
"destroy",
"(",
")",
"{",
"if",
"(",
"debuggable",
"(",
")",
")",
"{",
"hasInit",
"=",
"false",
";",
"LogisticsCenter",
".",
"suspend",
"(",
")",
";",
"logger",
".",
"info",
"(",
"Consts",
".",
"TAG",
",",
"\"ARouter d... | Destroy arouter, it can be used only in debug mode. | [
"Destroy",
"arouter",
"it",
"can",
"be",
"used",
"only",
"in",
"debug",
"mode",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java#L73-L81 |
126,175 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java | _ARouter.build | protected Postcard build(String path) {
if (TextUtils.isEmpty(path)) {
throw new HandlerException(Consts.TAG + "Parameter is invalid!");
} else {
PathReplaceService pService = ARouter.getInstance().navigation(PathReplaceService.class);
if (null != pService) {
... | java | protected Postcard build(String path) {
if (TextUtils.isEmpty(path)) {
throw new HandlerException(Consts.TAG + "Parameter is invalid!");
} else {
PathReplaceService pService = ARouter.getInstance().navigation(PathReplaceService.class);
if (null != pService) {
... | [
"protected",
"Postcard",
"build",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"TextUtils",
".",
"isEmpty",
"(",
"path",
")",
")",
"{",
"throw",
"new",
"HandlerException",
"(",
"Consts",
".",
"TAG",
"+",
"\"Parameter is invalid!\"",
")",
";",
"}",
"else",
... | Build postcard by path and default group | [
"Build",
"postcard",
"by",
"path",
"and",
"default",
"group"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java#L179-L189 |
126,176 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java | _ARouter.build | protected Postcard build(Uri uri) {
if (null == uri || TextUtils.isEmpty(uri.toString())) {
throw new HandlerException(Consts.TAG + "Parameter invalid!");
} else {
PathReplaceService pService = ARouter.getInstance().navigation(PathReplaceService.class);
if (null != pS... | java | protected Postcard build(Uri uri) {
if (null == uri || TextUtils.isEmpty(uri.toString())) {
throw new HandlerException(Consts.TAG + "Parameter invalid!");
} else {
PathReplaceService pService = ARouter.getInstance().navigation(PathReplaceService.class);
if (null != pS... | [
"protected",
"Postcard",
"build",
"(",
"Uri",
"uri",
")",
"{",
"if",
"(",
"null",
"==",
"uri",
"||",
"TextUtils",
".",
"isEmpty",
"(",
"uri",
".",
"toString",
"(",
")",
")",
")",
"{",
"throw",
"new",
"HandlerException",
"(",
"Consts",
".",
"TAG",
"+"... | Build postcard by uri | [
"Build",
"postcard",
"by",
"uri"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java#L194-L204 |
126,177 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java | _ARouter.build | protected Postcard build(String path, String group) {
if (TextUtils.isEmpty(path) || TextUtils.isEmpty(group)) {
throw new HandlerException(Consts.TAG + "Parameter is invalid!");
} else {
PathReplaceService pService = ARouter.getInstance().navigation(PathReplaceService.class);
... | java | protected Postcard build(String path, String group) {
if (TextUtils.isEmpty(path) || TextUtils.isEmpty(group)) {
throw new HandlerException(Consts.TAG + "Parameter is invalid!");
} else {
PathReplaceService pService = ARouter.getInstance().navigation(PathReplaceService.class);
... | [
"protected",
"Postcard",
"build",
"(",
"String",
"path",
",",
"String",
"group",
")",
"{",
"if",
"(",
"TextUtils",
".",
"isEmpty",
"(",
"path",
")",
"||",
"TextUtils",
".",
"isEmpty",
"(",
"group",
")",
")",
"{",
"throw",
"new",
"HandlerException",
"(",
... | Build postcard by path and group | [
"Build",
"postcard",
"by",
"path",
"and",
"group"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java#L209-L219 |
126,178 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java | _ARouter.extractGroup | private String extractGroup(String path) {
if (TextUtils.isEmpty(path) || !path.startsWith("/")) {
throw new HandlerException(Consts.TAG + "Extract the default group failed, the path must be start with '/' and contain more than 2 '/'!");
}
try {
String defaultGroup = pat... | java | private String extractGroup(String path) {
if (TextUtils.isEmpty(path) || !path.startsWith("/")) {
throw new HandlerException(Consts.TAG + "Extract the default group failed, the path must be start with '/' and contain more than 2 '/'!");
}
try {
String defaultGroup = pat... | [
"private",
"String",
"extractGroup",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"TextUtils",
".",
"isEmpty",
"(",
"path",
")",
"||",
"!",
"path",
".",
"startsWith",
"(",
"\"/\"",
")",
")",
"{",
"throw",
"new",
"HandlerException",
"(",
"Consts",
".",
"... | Extract the default group from path. | [
"Extract",
"the",
"default",
"group",
"from",
"path",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java#L224-L240 |
126,179 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java | _ARouter.navigation | protected Object navigation(final Context context, final Postcard postcard, final int requestCode, final NavigationCallback callback) {
try {
LogisticsCenter.completion(postcard);
} catch (NoRouteFoundException ex) {
logger.warning(Consts.TAG, ex.getMessage());
if (d... | java | protected Object navigation(final Context context, final Postcard postcard, final int requestCode, final NavigationCallback callback) {
try {
LogisticsCenter.completion(postcard);
} catch (NoRouteFoundException ex) {
logger.warning(Consts.TAG, ex.getMessage());
if (d... | [
"protected",
"Object",
"navigation",
"(",
"final",
"Context",
"context",
",",
"final",
"Postcard",
"postcard",
",",
"final",
"int",
"requestCode",
",",
"final",
"NavigationCallback",
"callback",
")",
"{",
"try",
"{",
"LogisticsCenter",
".",
"completion",
"(",
"p... | Use router navigation.
@param context Activity or null.
@param postcard Route metas
@param requestCode RequestCode
@param callback cb | [
"Use",
"router",
"navigation",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java#L278-L343 |
126,180 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java | _ARouter.runInMainThread | private void runInMainThread(Runnable runnable) {
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
mHandler.post(runnable);
} else {
runnable.run();
}
} | java | private void runInMainThread(Runnable runnable) {
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
mHandler.post(runnable);
} else {
runnable.run();
}
} | [
"private",
"void",
"runInMainThread",
"(",
"Runnable",
"runnable",
")",
"{",
"if",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
".",
"getThread",
"(",
")",
"!=",
"Thread",
".",
"currentThread",
"(",
")",
")",
"{",
"mHandler",
".",
"post",
"(",
"runnabl... | Be sure execute in main thread.
@param runnable code | [
"Be",
"sure",
"execute",
"in",
"main",
"thread",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/_ARouter.java#L409-L415 |
126,181 | alibaba/ARouter | arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/InterceptorProcessor.java | InterceptorProcessor.parseInterceptors | private void parseInterceptors(Set<? extends Element> elements) throws IOException {
if (CollectionUtils.isNotEmpty(elements)) {
logger.info(">>> Found interceptors, size is " + elements.size() + " <<<");
// Verify and cache, sort incidentally.
for (Element element : element... | java | private void parseInterceptors(Set<? extends Element> elements) throws IOException {
if (CollectionUtils.isNotEmpty(elements)) {
logger.info(">>> Found interceptors, size is " + elements.size() + " <<<");
// Verify and cache, sort incidentally.
for (Element element : element... | [
"private",
"void",
"parseInterceptors",
"(",
"Set",
"<",
"?",
"extends",
"Element",
">",
"elements",
")",
"throws",
"IOException",
"{",
"if",
"(",
"CollectionUtils",
".",
"isNotEmpty",
"(",
"elements",
")",
")",
"{",
"logger",
".",
"info",
"(",
"\">>> Found ... | Parse tollgate.
@param elements elements of tollgate. | [
"Parse",
"tollgate",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/InterceptorProcessor.java#L84-L157 |
126,182 | alibaba/ARouter | arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/InterceptorProcessor.java | InterceptorProcessor.verify | private boolean verify(Element element) {
Interceptor interceptor = element.getAnnotation(Interceptor.class);
// It must be implement the interface IInterceptor and marked with annotation Interceptor.
return null != interceptor && ((TypeElement) element).getInterfaces().contains(iInterceptor);
... | java | private boolean verify(Element element) {
Interceptor interceptor = element.getAnnotation(Interceptor.class);
// It must be implement the interface IInterceptor and marked with annotation Interceptor.
return null != interceptor && ((TypeElement) element).getInterfaces().contains(iInterceptor);
... | [
"private",
"boolean",
"verify",
"(",
"Element",
"element",
")",
"{",
"Interceptor",
"interceptor",
"=",
"element",
".",
"getAnnotation",
"(",
"Interceptor",
".",
"class",
")",
";",
"// It must be implement the interface IInterceptor and marked with annotation Interceptor.",
... | Verify inteceptor meta
@param element Interceptor taw type
@return verify result | [
"Verify",
"inteceptor",
"meta"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/InterceptorProcessor.java#L165-L169 |
126,183 | alibaba/ARouter | arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java | RouteProcessor.init | @Override
public synchronized void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv);
if (generateDoc) {
try {
docWriter = mFiler.createResource(
StandardLocation.SOURCE_OUTPUT,
PACKAGE_OF_GENERATE_DOCS,... | java | @Override
public synchronized void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv);
if (generateDoc) {
try {
docWriter = mFiler.createResource(
StandardLocation.SOURCE_OUTPUT,
PACKAGE_OF_GENERATE_DOCS,... | [
"@",
"Override",
"public",
"synchronized",
"void",
"init",
"(",
"ProcessingEnvironment",
"processingEnv",
")",
"{",
"super",
".",
"init",
"(",
"processingEnv",
")",
";",
"if",
"(",
"generateDoc",
")",
"{",
"try",
"{",
"docWriter",
"=",
"mFiler",
".",
"create... | Writer used for write doc | [
"Writer",
"used",
"for",
"write",
"doc"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java#L84-L103 |
126,184 | alibaba/ARouter | arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java | RouteProcessor.extractDocInfo | private RouteDoc extractDocInfo(RouteMeta routeMeta) {
RouteDoc routeDoc = new RouteDoc();
routeDoc.setGroup(routeMeta.getGroup());
routeDoc.setPath(routeMeta.getPath());
routeDoc.setDescription(routeMeta.getName());
routeDoc.setType(routeMeta.getType().name().toLowerCase());
... | java | private RouteDoc extractDocInfo(RouteMeta routeMeta) {
RouteDoc routeDoc = new RouteDoc();
routeDoc.setGroup(routeMeta.getGroup());
routeDoc.setPath(routeMeta.getPath());
routeDoc.setDescription(routeMeta.getName());
routeDoc.setType(routeMeta.getType().name().toLowerCase());
... | [
"private",
"RouteDoc",
"extractDocInfo",
"(",
"RouteMeta",
"routeMeta",
")",
"{",
"RouteDoc",
"routeDoc",
"=",
"new",
"RouteDoc",
"(",
")",
";",
"routeDoc",
".",
"setGroup",
"(",
"routeMeta",
".",
"getGroup",
"(",
")",
")",
";",
"routeDoc",
".",
"setPath",
... | Extra doc info from route meta
@param routeMeta meta
@return doc | [
"Extra",
"doc",
"info",
"from",
"route",
"meta"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java#L384-L393 |
126,185 | alibaba/ARouter | arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java | RouteProcessor.categories | private void categories(RouteMeta routeMete) {
if (routeVerify(routeMete)) {
logger.info(">>> Start categories, group = " + routeMete.getGroup() + ", path = " + routeMete.getPath() + " <<<");
Set<RouteMeta> routeMetas = groupMap.get(routeMete.getGroup());
if (CollectionUtils.... | java | private void categories(RouteMeta routeMete) {
if (routeVerify(routeMete)) {
logger.info(">>> Start categories, group = " + routeMete.getGroup() + ", path = " + routeMete.getPath() + " <<<");
Set<RouteMeta> routeMetas = groupMap.get(routeMete.getGroup());
if (CollectionUtils.... | [
"private",
"void",
"categories",
"(",
"RouteMeta",
"routeMete",
")",
"{",
"if",
"(",
"routeVerify",
"(",
"routeMete",
")",
")",
"{",
"logger",
".",
"info",
"(",
"\">>> Start categories, group = \"",
"+",
"routeMete",
".",
"getGroup",
"(",
")",
"+",
"\", path =... | Sort metas in group.
@param routeMete metas. | [
"Sort",
"metas",
"in",
"group",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java#L400-L424 |
126,186 | alibaba/ARouter | arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java | RouteProcessor.routeVerify | private boolean routeVerify(RouteMeta meta) {
String path = meta.getPath();
if (StringUtils.isEmpty(path) || !path.startsWith("/")) { // The path must be start with '/' and not empty!
return false;
}
if (StringUtils.isEmpty(meta.getGroup())) { // Use default group(the fir... | java | private boolean routeVerify(RouteMeta meta) {
String path = meta.getPath();
if (StringUtils.isEmpty(path) || !path.startsWith("/")) { // The path must be start with '/' and not empty!
return false;
}
if (StringUtils.isEmpty(meta.getGroup())) { // Use default group(the fir... | [
"private",
"boolean",
"routeVerify",
"(",
"RouteMeta",
"meta",
")",
"{",
"String",
"path",
"=",
"meta",
".",
"getPath",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"path",
")",
"||",
"!",
"path",
".",
"startsWith",
"(",
"\"/\"",
")",
... | Verify the route meta
@param meta raw meta | [
"Verify",
"the",
"route",
"meta"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/RouteProcessor.java#L431-L454 |
126,187 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java | Postcard.withOptionsCompat | @RequiresApi(16)
public Postcard withOptionsCompat(ActivityOptionsCompat compat) {
if (null != compat) {
this.optionsCompat = compat.toBundle();
}
return this;
} | java | @RequiresApi(16)
public Postcard withOptionsCompat(ActivityOptionsCompat compat) {
if (null != compat) {
this.optionsCompat = compat.toBundle();
}
return this;
} | [
"@",
"RequiresApi",
"(",
"16",
")",
"public",
"Postcard",
"withOptionsCompat",
"(",
"ActivityOptionsCompat",
"compat",
")",
"{",
"if",
"(",
"null",
"!=",
"compat",
")",
"{",
"this",
".",
"optionsCompat",
"=",
"compat",
".",
"toBundle",
"(",
")",
";",
"}",
... | Set options compat
@param compat compat
@return this | [
"Set",
"options",
"compat"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L570-L576 |
126,188 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java | ARouter.init | public static void init(Application application) {
if (!hasInit) {
logger = _ARouter.logger;
_ARouter.logger.info(Consts.TAG, "ARouter init start.");
hasInit = _ARouter.init(application);
if (hasInit) {
_ARouter.afterInit();
}
... | java | public static void init(Application application) {
if (!hasInit) {
logger = _ARouter.logger;
_ARouter.logger.info(Consts.TAG, "ARouter init start.");
hasInit = _ARouter.init(application);
if (hasInit) {
_ARouter.afterInit();
}
... | [
"public",
"static",
"void",
"init",
"(",
"Application",
"application",
")",
"{",
"if",
"(",
"!",
"hasInit",
")",
"{",
"logger",
"=",
"_ARouter",
".",
"logger",
";",
"_ARouter",
".",
"logger",
".",
"info",
"(",
"Consts",
".",
"TAG",
",",
"\"ARouter init s... | Init, it must be call before used router. | [
"Init",
"it",
"must",
"be",
"call",
"before",
"used",
"router",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java#L37-L49 |
126,189 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java | ARouter.getInstance | public static ARouter getInstance() {
if (!hasInit) {
throw new InitException("ARouter::Init::Invoke init(context) first!");
} else {
if (instance == null) {
synchronized (ARouter.class) {
if (instance == null) {
instanc... | java | public static ARouter getInstance() {
if (!hasInit) {
throw new InitException("ARouter::Init::Invoke init(context) first!");
} else {
if (instance == null) {
synchronized (ARouter.class) {
if (instance == null) {
instanc... | [
"public",
"static",
"ARouter",
"getInstance",
"(",
")",
"{",
"if",
"(",
"!",
"hasInit",
")",
"{",
"throw",
"new",
"InitException",
"(",
"\"ARouter::Init::Invoke init(context) first!\"",
")",
";",
"}",
"else",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"{... | Get instance of router. A
All feature U use, will be starts here. | [
"Get",
"instance",
"of",
"router",
".",
"A",
"All",
"feature",
"U",
"use",
"will",
"be",
"starts",
"here",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java#L55-L68 |
126,190 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java | ARouter.build | @Deprecated
public Postcard build(String path, String group) {
return _ARouter.getInstance().build(path, group);
} | java | @Deprecated
public Postcard build(String path, String group) {
return _ARouter.getInstance().build(path, group);
} | [
"@",
"Deprecated",
"public",
"Postcard",
"build",
"(",
"String",
"path",
",",
"String",
"group",
")",
"{",
"return",
"_ARouter",
".",
"getInstance",
"(",
")",
".",
"build",
"(",
"path",
",",
"group",
")",
";",
"}"
] | Build the roadmap, draw a postcard.
@param path Where you go.
@param group The group of path. | [
"Build",
"the",
"roadmap",
"draw",
"a",
"postcard",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java#L150-L153 |
126,191 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java | ARouter.navigation | public <T> T navigation(Class<? extends T> service) {
return _ARouter.getInstance().navigation(service);
} | java | public <T> T navigation(Class<? extends T> service) {
return _ARouter.getInstance().navigation(service);
} | [
"public",
"<",
"T",
">",
"T",
"navigation",
"(",
"Class",
"<",
"?",
"extends",
"T",
">",
"service",
")",
"{",
"return",
"_ARouter",
".",
"getInstance",
"(",
")",
".",
"navigation",
"(",
"service",
")",
";",
"}"
] | Launch the navigation by type
@param service interface of service
@param <T> return type
@return instance of service | [
"Launch",
"the",
"navigation",
"by",
"type"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java#L171-L173 |
126,192 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java | ARouter.navigation | public Object navigation(Context mContext, Postcard postcard, int requestCode, NavigationCallback callback) {
return _ARouter.getInstance().navigation(mContext, postcard, requestCode, callback);
} | java | public Object navigation(Context mContext, Postcard postcard, int requestCode, NavigationCallback callback) {
return _ARouter.getInstance().navigation(mContext, postcard, requestCode, callback);
} | [
"public",
"Object",
"navigation",
"(",
"Context",
"mContext",
",",
"Postcard",
"postcard",
",",
"int",
"requestCode",
",",
"NavigationCallback",
"callback",
")",
"{",
"return",
"_ARouter",
".",
"getInstance",
"(",
")",
".",
"navigation",
"(",
"mContext",
",",
... | Launch the navigation.
@param mContext .
@param postcard .
@param requestCode Set for startActivityForResult
@param callback cb | [
"Launch",
"the",
"navigation",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/launcher/ARouter.java#L183-L185 |
126,193 | alibaba/ARouter | arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/AutowiredProcessor.java | AutowiredProcessor.categories | private void categories(Set<? extends Element> elements) throws IllegalAccessException {
if (CollectionUtils.isNotEmpty(elements)) {
for (Element element : elements) {
TypeElement enclosingElement = (TypeElement) element.getEnclosingElement();
if (element.getModifier... | java | private void categories(Set<? extends Element> elements) throws IllegalAccessException {
if (CollectionUtils.isNotEmpty(elements)) {
for (Element element : elements) {
TypeElement enclosingElement = (TypeElement) element.getEnclosingElement();
if (element.getModifier... | [
"private",
"void",
"categories",
"(",
"Set",
"<",
"?",
"extends",
"Element",
">",
"elements",
")",
"throws",
"IllegalAccessException",
"{",
"if",
"(",
"CollectionUtils",
".",
"isNotEmpty",
"(",
"elements",
")",
")",
"{",
"for",
"(",
"Element",
"element",
":"... | Categories field, find his papa.
@param elements Field need autowired | [
"Categories",
"field",
"find",
"his",
"papa",
"."
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/processor/AutowiredProcessor.java#L255-L276 |
126,194 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java | LogisticsCenter.register | private static void register(String className) {
if (!TextUtils.isEmpty(className)) {
try {
Class<?> clazz = Class.forName(className);
Object obj = clazz.getConstructor().newInstance();
if (obj instanceof IRouteRoot) {
registerRoute... | java | private static void register(String className) {
if (!TextUtils.isEmpty(className)) {
try {
Class<?> clazz = Class.forName(className);
Object obj = clazz.getConstructor().newInstance();
if (obj instanceof IRouteRoot) {
registerRoute... | [
"private",
"static",
"void",
"register",
"(",
"String",
"className",
")",
"{",
"if",
"(",
"!",
"TextUtils",
".",
"isEmpty",
"(",
"className",
")",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
"Class",
".",
"forName",
"(",
"className",
... | register by class name
Sacrificing a bit of efficiency to solve
the problem that the main dex file size is too large
@author billy.qi <a href="mailto:qiyilike@163.com">Contact me.</a>
@param className class name | [
"register",
"by",
"class",
"name",
"Sacrificing",
"a",
"bit",
"of",
"efficiency",
"to",
"solve",
"the",
"problem",
"that",
"the",
"main",
"dex",
"file",
"size",
"is",
"too",
"large"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java#L78-L97 |
126,195 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java | LogisticsCenter.registerRouteRoot | private static void registerRouteRoot(IRouteRoot routeRoot) {
markRegisteredByPlugin();
if (routeRoot != null) {
routeRoot.loadInto(Warehouse.groupsIndex);
}
} | java | private static void registerRouteRoot(IRouteRoot routeRoot) {
markRegisteredByPlugin();
if (routeRoot != null) {
routeRoot.loadInto(Warehouse.groupsIndex);
}
} | [
"private",
"static",
"void",
"registerRouteRoot",
"(",
"IRouteRoot",
"routeRoot",
")",
"{",
"markRegisteredByPlugin",
"(",
")",
";",
"if",
"(",
"routeRoot",
"!=",
"null",
")",
"{",
"routeRoot",
".",
"loadInto",
"(",
"Warehouse",
".",
"groupsIndex",
")",
";",
... | method for arouter-auto-register plugin to register Routers
@param routeRoot IRouteRoot implementation class in the package: com.alibaba.android.arouter.core.routers
@author billy.qi <a href="mailto:qiyilike@163.com">Contact me.</a>
@since 2017-12-06 | [
"method",
"for",
"arouter",
"-",
"auto",
"-",
"register",
"plugin",
"to",
"register",
"Routers"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java#L105-L110 |
126,196 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java | LogisticsCenter.registerInterceptor | private static void registerInterceptor(IInterceptorGroup interceptorGroup) {
markRegisteredByPlugin();
if (interceptorGroup != null) {
interceptorGroup.loadInto(Warehouse.interceptorsIndex);
}
} | java | private static void registerInterceptor(IInterceptorGroup interceptorGroup) {
markRegisteredByPlugin();
if (interceptorGroup != null) {
interceptorGroup.loadInto(Warehouse.interceptorsIndex);
}
} | [
"private",
"static",
"void",
"registerInterceptor",
"(",
"IInterceptorGroup",
"interceptorGroup",
")",
"{",
"markRegisteredByPlugin",
"(",
")",
";",
"if",
"(",
"interceptorGroup",
"!=",
"null",
")",
"{",
"interceptorGroup",
".",
"loadInto",
"(",
"Warehouse",
".",
... | method for arouter-auto-register plugin to register Interceptors
@param interceptorGroup IInterceptorGroup implementation class in the package: com.alibaba.android.arouter.core.routers
@author billy.qi <a href="mailto:qiyilike@163.com">Contact me.</a>
@since 2017-12-06 | [
"method",
"for",
"arouter",
"-",
"auto",
"-",
"register",
"plugin",
"to",
"register",
"Interceptors"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java#L118-L123 |
126,197 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java | LogisticsCenter.registerProvider | private static void registerProvider(IProviderGroup providerGroup) {
markRegisteredByPlugin();
if (providerGroup != null) {
providerGroup.loadInto(Warehouse.providersIndex);
}
} | java | private static void registerProvider(IProviderGroup providerGroup) {
markRegisteredByPlugin();
if (providerGroup != null) {
providerGroup.loadInto(Warehouse.providersIndex);
}
} | [
"private",
"static",
"void",
"registerProvider",
"(",
"IProviderGroup",
"providerGroup",
")",
"{",
"markRegisteredByPlugin",
"(",
")",
";",
"if",
"(",
"providerGroup",
"!=",
"null",
")",
"{",
"providerGroup",
".",
"loadInto",
"(",
"Warehouse",
".",
"providersIndex... | method for arouter-auto-register plugin to register Providers
@param providerGroup IProviderGroup implementation class in the package: com.alibaba.android.arouter.core.routers
@author billy.qi <a href="mailto:qiyilike@163.com">Contact me.</a>
@since 2017-12-06 | [
"method",
"for",
"arouter",
"-",
"auto",
"-",
"register",
"plugin",
"to",
"register",
"Providers"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java#L131-L136 |
126,198 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java | LogisticsCenter.buildProvider | public static Postcard buildProvider(String serviceName) {
RouteMeta meta = Warehouse.providersIndex.get(serviceName);
if (null == meta) {
return null;
} else {
return new Postcard(meta.getPath(), meta.getGroup());
}
} | java | public static Postcard buildProvider(String serviceName) {
RouteMeta meta = Warehouse.providersIndex.get(serviceName);
if (null == meta) {
return null;
} else {
return new Postcard(meta.getPath(), meta.getGroup());
}
} | [
"public",
"static",
"Postcard",
"buildProvider",
"(",
"String",
"serviceName",
")",
"{",
"RouteMeta",
"meta",
"=",
"Warehouse",
".",
"providersIndex",
".",
"get",
"(",
"serviceName",
")",
";",
"if",
"(",
"null",
"==",
"meta",
")",
"{",
"return",
"null",
";... | Build postcard by serviceName
@param serviceName interfaceName
@return postcard | [
"Build",
"postcard",
"by",
"serviceName"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java#L218-L226 |
126,199 | alibaba/ARouter | arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java | LogisticsCenter.setValue | private static void setValue(Postcard postcard, Integer typeDef, String key, String value) {
if (TextUtils.isEmpty(key) || TextUtils.isEmpty(value)) {
return;
}
try {
if (null != typeDef) {
if (typeDef == TypeKind.BOOLEAN.ordinal()) {
... | java | private static void setValue(Postcard postcard, Integer typeDef, String key, String value) {
if (TextUtils.isEmpty(key) || TextUtils.isEmpty(value)) {
return;
}
try {
if (null != typeDef) {
if (typeDef == TypeKind.BOOLEAN.ordinal()) {
... | [
"private",
"static",
"void",
"setValue",
"(",
"Postcard",
"postcard",
",",
"Integer",
"typeDef",
",",
"String",
"key",
",",
"String",
"value",
")",
"{",
"if",
"(",
"TextUtils",
".",
"isEmpty",
"(",
"key",
")",
"||",
"TextUtils",
".",
"isEmpty",
"(",
"val... | Set value by known type
@param postcard postcard
@param typeDef type
@param key key
@param value value | [
"Set",
"value",
"by",
"known",
"type"
] | 1a06912a6e14a57112db1204b43f81c43d721732 | https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/core/LogisticsCenter.java#L326-L362 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.