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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
108,300 | CloudSlang/cs-actions | cs-postgres/src/main/java/io/cloudslang/content/postgres/services/ConfigService.java | ConfigService.changeProperty | public static void changeProperty(String filename, String[] allowedHosts, String[] allowedUsers) throws IOException {
if ((allowedHosts == null || allowedHosts.length == 0) && (allowedUsers == null || allowedUsers.length == 0)) {
return;
}
final File file = new File(filename);
... | java | public static void changeProperty(String filename, String[] allowedHosts, String[] allowedUsers) throws IOException {
if ((allowedHosts == null || allowedHosts.length == 0) && (allowedUsers == null || allowedUsers.length == 0)) {
return;
}
final File file = new File(filename);
... | [
"public",
"static",
"void",
"changeProperty",
"(",
"String",
"filename",
",",
"String",
"[",
"]",
"allowedHosts",
",",
"String",
"[",
"]",
"allowedUsers",
")",
"throws",
"IOException",
"{",
"if",
"(",
"(",
"allowedHosts",
"==",
"null",
"||",
"allowedHosts",
... | Method to modify the Postgres config pg_hba.config
@param filename The filename of the config to be updated.
@param allowedHosts A wildcard or a comma-separated list of hostnames or IPs (IPv4 or IPv6).
@param allowedUsers A comma-separated list of PostgreSQL users. If no value is specified for this input,
all user... | [
"Method",
"to",
"modify",
"the",
"Postgres",
"config",
"pg_hba",
".",
"config"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-postgres/src/main/java/io/cloudslang/content/postgres/services/ConfigService.java#L158-L209 |
108,301 | CloudSlang/cs-actions | cs-xml/src/main/java/io/cloudslang/content/xml/actions/ConvertXmlToJson.java | ConvertXmlToJson.execute | @Action(name = "Convert XML to Json",
outputs = {
@Output(NAMESPACES_PREFIXES),
@Output(NAMESPACES_URIS),
@Output(RETURN_RESULT),
@Output(RETURN_CODE),
@Output(EXCEPTION)
},
responses ... | java | @Action(name = "Convert XML to Json",
outputs = {
@Output(NAMESPACES_PREFIXES),
@Output(NAMESPACES_URIS),
@Output(RETURN_RESULT),
@Output(RETURN_CODE),
@Output(EXCEPTION)
},
responses ... | [
"@",
"Action",
"(",
"name",
"=",
"\"Convert XML to Json\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"NAMESPACES_PREFIXES",
")",
",",
"@",
"Output",
"(",
"NAMESPACES_URIS",
")",
",",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
... | Converts a XML document to a JSON array or a JSON object.
@param xml - The XML document (in the form of a String)
@param textElementsName - specify custom property name for text elements. This will be used for elements that have attributes and text content.
Default value: '_text'
@param includeRootEle... | [
"Converts",
"a",
"XML",
"document",
"to",
"a",
"JSON",
"array",
"or",
"a",
"JSON",
"object",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/actions/ConvertXmlToJson.java#L70-L118 |
108,302 | CloudSlang/cs-actions | cs-lists/src/main/java/io/cloudslang/content/actions/ListTrimAction.java | ListTrimAction.trimList | @Action(name = "Trim List",
outputs = {
@Output(RESULT_TEXT),
@Output(RESPONSE),
@Output(RETURN_RESULT),
@Output(RETURN_CODE)
},
responses = {@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_... | java | @Action(name = "Trim List",
outputs = {
@Output(RESULT_TEXT),
@Output(RESPONSE),
@Output(RETURN_RESULT),
@Output(RETURN_CODE)
},
responses = {@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_... | [
"@",
"Action",
"(",
"name",
"=",
"\"Trim List\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RESULT_TEXT",
")",
",",
"@",
"Output",
"(",
"RESPONSE",
")",
",",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"RETURN_CODE",
")",
... | This method trims values from a list. The values trimmed are equally distributed from the high and low ends
of the list. The list is sorted before trimming. The number of elements trimmed is dictated by the percentage
that is passed in. If the percentage would indicate an odd number of elements the number trimmed is l... | [
"This",
"method",
"trims",
"values",
"from",
"a",
"list",
".",
"The",
"values",
"trimmed",
"are",
"equally",
"distributed",
"from",
"the",
"high",
"and",
"low",
"ends",
"of",
"the",
"list",
".",
"The",
"list",
"is",
"sorted",
"before",
"trimming",
".",
"... | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-lists/src/main/java/io/cloudslang/content/actions/ListTrimAction.java#L60-L103 |
108,303 | CloudSlang/cs-actions | cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/FindTextInPdf.java | FindTextInPdf.execute | @Action(name = "Find Text in PDF",
description = FIND_TEXT_IN_PDF_OPERATION_DESC,
outputs = {
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = FIND_TEXT_IN_PDF_RETURN_RESULT_DESC),
... | java | @Action(name = "Find Text in PDF",
description = FIND_TEXT_IN_PDF_OPERATION_DESC,
outputs = {
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = FIND_TEXT_IN_PDF_RETURN_RESULT_DESC),
... | [
"@",
"Action",
"(",
"name",
"=",
"\"Find Text in PDF\"",
",",
"description",
"=",
"FIND_TEXT_IN_PDF_OPERATION_DESC",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"value",
"=",
"RETURN_CODE",
",",
"description",
"=",
"RETURN_CODE_DESC",
")",
",",
"@",
"Output",
... | This operation checks if a text input is found in a PDF file.
@param text The text to be searched for in the PDF file.
@param ignoreCase Whether to ignore if characters of the text are lowercase or uppercase.
Valid values: "true", "false".
Default Value: "false"
@param pathToFile The full path to the PDF file.
@... | [
"This",
"operation",
"checks",
"if",
"a",
"text",
"input",
"is",
"found",
"in",
"a",
"PDF",
"file",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/FindTextInPdf.java#L72-L102 |
108,304 | CloudSlang/cs-actions | cs-lists/src/main/java/io/cloudslang/content/actions/ListPrependerAction.java | ListPrependerAction.prependElement | @Action(name = "List Prepender",
outputs = {
@Output(RESPONSE),
@Output(RETURN_RESULT),
@Output(RETURN_CODE)
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, ma... | java | @Action(name = "List Prepender",
outputs = {
@Output(RESPONSE),
@Output(RETURN_RESULT),
@Output(RETURN_CODE)
},
responses = {
@Response(text = SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, ma... | [
"@",
"Action",
"(",
"name",
"=",
"\"List Prepender\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RESPONSE",
")",
",",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"RETURN_CODE",
")",
"}",
",",
"responses",
"=",
"{",
"@",
"R... | This method pre-pends an element to a list of strings.
@param list The list to pre-pend to.
@param element The element to pre-pend to the list.
@param delimiter The list delimiter. Delimiter can be empty string.
@return The new list. | [
"This",
"method",
"pre",
"-",
"pends",
"an",
"element",
"to",
"a",
"list",
"of",
"strings",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-lists/src/main/java/io/cloudslang/content/actions/ListPrependerAction.java#L55-L81 |
108,305 | CloudSlang/cs-actions | cs-xml/src/main/java/io/cloudslang/content/xml/actions/AppendChild.java | AppendChild.execute | @Action(name = "Append Child",
outputs = {
@Output(RETURN_CODE),
@Output(RETURN_RESULT),
@Output(RESULT_XML),
@Output(ERROR_MESSAGE)},
responses = {
@Response(text = ResponseNames.SUCCESS, field =... | java | @Action(name = "Append Child",
outputs = {
@Output(RETURN_CODE),
@Output(RETURN_RESULT),
@Output(RESULT_XML),
@Output(ERROR_MESSAGE)},
responses = {
@Response(text = ResponseNames.SUCCESS, field =... | [
"@",
"Action",
"(",
"name",
"=",
"\"Append Child\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RETURN_CODE",
")",
",",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"RESULT_XML",
")",
",",
"@",
"Output",
"(",
"ERROR_MESSAGE",
... | Appends a child to an XML element.
@param xmlDocument XML string to append a child in
@param xmlDocumentSource The source type of the xml document.
Valid values: xmlString, xmlPath
Default value: xmlString
@param xPathQuery XPATH query that results in an element or element list, where child element will b... | [
"Appends",
"a",
"child",
"to",
"an",
"XML",
"element",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/actions/AppendChild.java#L46-L74 |
108,306 | CloudSlang/cs-actions | cs-ssh/src/main/java/io/cloudslang/content/ssh/utils/CacheUtils.java | CacheUtils.saveSshSessionAndChannel | public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
final SSHConnection sshConnection;
if (channel != null) {
sshConnection = new SSHConnection(session, channel);
} else {
... | java | public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
final SSHConnection sshConnection;
if (channel != null) {
sshConnection = new SSHConnection(session, channel);
} else {
... | [
"public",
"static",
"boolean",
"saveSshSessionAndChannel",
"(",
"Session",
"session",
",",
"Channel",
"channel",
",",
"GlobalSessionObject",
"<",
"Map",
"<",
"String",
",",
"SSHConnection",
">",
">",
"sessionParam",
",",
"String",
"sessionId",
")",
"{",
"final",
... | Save the SSH session and the channel in the cache.
@param session The SSH session.
@param channel The SSH channel.
@param sessionParam The cache: GlobalSessionObject or SessionObject. | [
"Save",
"the",
"SSH",
"session",
"and",
"the",
"channel",
"in",
"the",
"cache",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-ssh/src/main/java/io/cloudslang/content/ssh/utils/CacheUtils.java#L79-L96 |
108,307 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/entities/EncoderDecoder.java | EncoderDecoder.encodeStringInBase64 | public static String encodeStringInBase64(String str, Charset charset) {
return new String(Base64.encodeBase64(str.getBytes(charset)));
} | java | public static String encodeStringInBase64(String str, Charset charset) {
return new String(Base64.encodeBase64(str.getBytes(charset)));
} | [
"public",
"static",
"String",
"encodeStringInBase64",
"(",
"String",
"str",
",",
"Charset",
"charset",
")",
"{",
"return",
"new",
"String",
"(",
"Base64",
".",
"encodeBase64",
"(",
"str",
".",
"getBytes",
"(",
"charset",
")",
")",
")",
";",
"}"
] | Encodes a string to base64.
@param str The string value to encode.
@param charset The encoding charset used to obtain the byte sequence of the string.
@return The encoded byte sequence using the base64 encoding. | [
"Encodes",
"a",
"string",
"to",
"base64",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/entities/EncoderDecoder.java#L36-L38 |
108,308 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/ClusterComputeResourceService.java | ClusterComputeResourceService.createVmOverrideConfiguration | private ClusterDasVmConfigInfo createVmOverrideConfiguration(ManagedObjectReference vmMor, String restartPriority) {
ClusterDasVmConfigInfo clusterDasVmConfigInfo = new ClusterDasVmConfigInfo();
clusterDasVmConfigInfo.setKey(vmMor);
clusterDasVmConfigInfo.setDasSettings(createClusterDasVmSetting... | java | private ClusterDasVmConfigInfo createVmOverrideConfiguration(ManagedObjectReference vmMor, String restartPriority) {
ClusterDasVmConfigInfo clusterDasVmConfigInfo = new ClusterDasVmConfigInfo();
clusterDasVmConfigInfo.setKey(vmMor);
clusterDasVmConfigInfo.setDasSettings(createClusterDasVmSetting... | [
"private",
"ClusterDasVmConfigInfo",
"createVmOverrideConfiguration",
"(",
"ManagedObjectReference",
"vmMor",
",",
"String",
"restartPriority",
")",
"{",
"ClusterDasVmConfigInfo",
"clusterDasVmConfigInfo",
"=",
"new",
"ClusterDasVmConfigInfo",
"(",
")",
";",
"clusterDasVmConfig... | Das method adds a vm override to a HA enabled Cluster.
@param vmMor
@param restartPriority
@return | [
"Das",
"method",
"adds",
"a",
"vm",
"override",
"to",
"a",
"HA",
"enabled",
"Cluster",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/ClusterComputeResourceService.java#L423-L428 |
108,309 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/ClusterComputeResourceService.java | ClusterComputeResourceService.createClusterDasVmSettings | private ClusterDasVmSettings createClusterDasVmSettings(String restartPriority) {
ClusterDasVmSettings clusterDasVmSettings = new ClusterDasVmSettings();
clusterDasVmSettings.setRestartPriority(restartPriority);
return clusterDasVmSettings;
} | java | private ClusterDasVmSettings createClusterDasVmSettings(String restartPriority) {
ClusterDasVmSettings clusterDasVmSettings = new ClusterDasVmSettings();
clusterDasVmSettings.setRestartPriority(restartPriority);
return clusterDasVmSettings;
} | [
"private",
"ClusterDasVmSettings",
"createClusterDasVmSettings",
"(",
"String",
"restartPriority",
")",
"{",
"ClusterDasVmSettings",
"clusterDasVmSettings",
"=",
"new",
"ClusterDasVmSettings",
"(",
")",
";",
"clusterDasVmSettings",
".",
"setRestartPriority",
"(",
"restartPrio... | Das method creates a cluster vm setting.
@param restartPriority
@return | [
"Das",
"method",
"creates",
"a",
"cluster",
"vm",
"setting",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/ClusterComputeResourceService.java#L467-L471 |
108,310 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/ClusterComputeResourceService.java | ClusterComputeResourceService.getClusterConfiguration | private ClusterConfigInfoEx getClusterConfiguration(ConnectionResources connectionResources, ManagedObjectReference clusterMor,
String clusterName) throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg {
ObjectContent[] objectContents = GetObjectProperties.... | java | private ClusterConfigInfoEx getClusterConfiguration(ConnectionResources connectionResources, ManagedObjectReference clusterMor,
String clusterName) throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg {
ObjectContent[] objectContents = GetObjectProperties.... | [
"private",
"ClusterConfigInfoEx",
"getClusterConfiguration",
"(",
"ConnectionResources",
"connectionResources",
",",
"ManagedObjectReference",
"clusterMor",
",",
"String",
"clusterName",
")",
"throws",
"RuntimeFaultFaultMsg",
",",
"InvalidPropertyFaultMsg",
"{",
"ObjectContent",
... | Das method gets the current cluster configurations.
@param connectionResources
@param clusterMor
@param clusterName
@return
@throws RuntimeFaultFaultMsg
@throws InvalidPropertyFaultMsg | [
"Das",
"method",
"gets",
"the",
"current",
"cluster",
"configurations",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/ClusterComputeResourceService.java#L483-L493 |
108,311 | CloudSlang/cs-actions | cs-postgres/src/main/java/io/cloudslang/content/postgres/actions/UpdatePostgresConfigAction.java | UpdatePostgresConfigAction.execute | @Action(name = "Update Property Value",
outputs = {
@Output(RETURN_CODE),
@Output(RETURN_RESULT),
@Output(EXCEPTION),
@Output(STDERR)
},
responses = {
@Response(text = ResponseNames.SU... | java | @Action(name = "Update Property Value",
outputs = {
@Output(RETURN_CODE),
@Output(RETURN_RESULT),
@Output(EXCEPTION),
@Output(STDERR)
},
responses = {
@Response(text = ResponseNames.SU... | [
"@",
"Action",
"(",
"name",
"=",
"\"Update Property Value\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RETURN_CODE",
")",
",",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"EXCEPTION",
")",
",",
"@",
"Output",
"(",
"STDERR",
... | Updates the Postgres config postgresql.conf
@param installationPath The full path to the PostgreSQL configuration file in the local machine to be updated
@param listenAddresses The list of addresses where the PostgreSQL database listens
@param port The port the PostgreSQL database should listen.
@pa... | [
"Updates",
"the",
"Postgres",
"config",
"postgresql",
".",
"conf"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-postgres/src/main/java/io/cloudslang/content/postgres/actions/UpdatePostgresConfigAction.java#L58-L97 |
108,312 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/connection/helpers/MoRefHandler.java | MoRefHandler.inContainerByType | public Map<String, ManagedObjectReference> inContainerByType(ManagedObjectReference folder,
String morefType,
RetrieveOptions retrieveOptions)
throws InvalidPropertyFaultMsg, Run... | java | public Map<String, ManagedObjectReference> inContainerByType(ManagedObjectReference folder,
String morefType,
RetrieveOptions retrieveOptions)
throws InvalidPropertyFaultMsg, Run... | [
"public",
"Map",
"<",
"String",
",",
"ManagedObjectReference",
">",
"inContainerByType",
"(",
"ManagedObjectReference",
"folder",
",",
"String",
"morefType",
",",
"RetrieveOptions",
"retrieveOptions",
")",
"throws",
"InvalidPropertyFaultMsg",
",",
"RuntimeFaultFaultMsg",
... | Returns all the MOREFs of the specified type that are present under the
container
@param folder {@link ManagedObjectReference} of the container to begin the
search from
@param morefType Type of the managed entity that needs to be searched
@return Map of name and MOREF of the managed objects present. If none
exist t... | [
"Returns",
"all",
"the",
"MOREFs",
"of",
"the",
"specified",
"type",
"that",
"are",
"present",
"under",
"the",
"container"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/connection/helpers/MoRefHandler.java#L98-L105 |
108,313 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/connection/helpers/MoRefHandler.java | MoRefHandler.containerViewByType | private RetrieveResult containerViewByType(final ManagedObjectReference container,
final String morefType,
final RetrieveOptions retrieveOptions,
final String... morefProperties
... | java | private RetrieveResult containerViewByType(final ManagedObjectReference container,
final String morefType,
final RetrieveOptions retrieveOptions,
final String... morefProperties
... | [
"private",
"RetrieveResult",
"containerViewByType",
"(",
"final",
"ManagedObjectReference",
"container",
",",
"final",
"String",
"morefType",
",",
"final",
"RetrieveOptions",
"retrieveOptions",
",",
"final",
"String",
"...",
"morefProperties",
")",
"throws",
"RuntimeFault... | Returns the raw RetrieveResult object for the provided container filtered on properties list
@param container - container to look in
@param morefType - type to filter for
@param morefProperties - properties to include
@return com.vmware.vim25.RetrieveResult for this query
@throws RuntimeFaultFaultMsg
@thro... | [
"Returns",
"the",
"raw",
"RetrieveResult",
"object",
"for",
"the",
"provided",
"container",
"filtered",
"on",
"properties",
"list"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/connection/helpers/MoRefHandler.java#L141-L149 |
108,314 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/connection/helpers/MoRefHandler.java | MoRefHandler.containerViewByType | private RetrieveResult containerViewByType(final ManagedObjectReference container,
final String morefType,
final RetrieveOptions retrieveOptions
) throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg {
return this.... | java | private RetrieveResult containerViewByType(final ManagedObjectReference container,
final String morefType,
final RetrieveOptions retrieveOptions
) throws RuntimeFaultFaultMsg, InvalidPropertyFaultMsg {
return this.... | [
"private",
"RetrieveResult",
"containerViewByType",
"(",
"final",
"ManagedObjectReference",
"container",
",",
"final",
"String",
"morefType",
",",
"final",
"RetrieveOptions",
"retrieveOptions",
")",
"throws",
"RuntimeFaultFaultMsg",
",",
"InvalidPropertyFaultMsg",
"{",
"ret... | Initialize the helper object on the current connection at invocation time. Do not initialize on construction
since the connection may not be ready yet. | [
"Initialize",
"the",
"helper",
"object",
"on",
"the",
"current",
"connection",
"at",
"invocation",
"time",
".",
"Do",
"not",
"initialize",
"on",
"construction",
"since",
"the",
"connection",
"may",
"not",
"be",
"ready",
"yet",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/connection/helpers/MoRefHandler.java#L156-L161 |
108,315 | CloudSlang/cs-actions | cs-database/src/main/java/io/cloudslang/content/database/utils/InputsProcessor.java | InputsProcessor.init | public static void init(SQLInputs sqlInputs) throws Exception {
if (sqlInputs != null) {
sqlInputs.setStrDelim(",");
sqlInputs.setStrColumns("");
sqlInputs.setLRows(new ArrayList<String>());
sqlInputs.setIUpdateCount(0);
sqlInputs.setSqlCommand(n... | java | public static void init(SQLInputs sqlInputs) throws Exception {
if (sqlInputs != null) {
sqlInputs.setStrDelim(",");
sqlInputs.setStrColumns("");
sqlInputs.setLRows(new ArrayList<String>());
sqlInputs.setIUpdateCount(0);
sqlInputs.setSqlCommand(n... | [
"public",
"static",
"void",
"init",
"(",
"SQLInputs",
"sqlInputs",
")",
"throws",
"Exception",
"{",
"if",
"(",
"sqlInputs",
"!=",
"null",
")",
"{",
"sqlInputs",
".",
"setStrDelim",
"(",
"\",\"",
")",
";",
"sqlInputs",
".",
"setStrColumns",
"(",
"\"\"",
")"... | init all the non-static variables.
@param sqlInputs | [
"init",
"all",
"the",
"non",
"-",
"static",
"variables",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/utils/InputsProcessor.java#L33-L61 |
108,316 | CloudSlang/cs-actions | cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/PooledDataSourceCleaner.java | PooledDataSourceCleaner.run | public void run() {
// todo if (logger.isDebugEnabled()) {
// logger.debug("start running PooledDataSourceCleaner");
// }
state = STATE_CLEANER.RUNNING;
while (state != STATE_CLEANER.SHUTDOWN) {
try {
Thread.sleep(interval * 1000);
} catch... | java | public void run() {
// todo if (logger.isDebugEnabled()) {
// logger.debug("start running PooledDataSourceCleaner");
// }
state = STATE_CLEANER.RUNNING;
while (state != STATE_CLEANER.SHUTDOWN) {
try {
Thread.sleep(interval * 1000);
} catch... | [
"public",
"void",
"run",
"(",
")",
"{",
"// todo if (logger.isDebugEnabled()) {",
"// logger.debug(\"start running PooledDataSourceCleaner\");",
"// }",
"state",
"=",
"STATE_CLEANER",
".",
"RUNNING",
";",
"while",
"(",
"state",
"!=",
"STATE_CLEANER",
"... | wake up and clean the pools if the pool has empty connection table. | [
"wake",
"up",
"and",
"clean",
"the",
"pools",
"if",
"the",
"pool",
"has",
"empty",
"connection",
"table",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/PooledDataSourceCleaner.java#L51-L77 |
108,317 | CloudSlang/cs-actions | cs-lists/src/main/java/io/cloudslang/content/utils/ListProcessor.java | ListProcessor.arrayElementsAreNull | public static boolean arrayElementsAreNull(String[] uncontainedArray) {
boolean empty = true;
for (Object ob : uncontainedArray) {
if (ob != null) {
empty = false;
break;
}
}
return empty;
} | java | public static boolean arrayElementsAreNull(String[] uncontainedArray) {
boolean empty = true;
for (Object ob : uncontainedArray) {
if (ob != null) {
empty = false;
break;
}
}
return empty;
} | [
"public",
"static",
"boolean",
"arrayElementsAreNull",
"(",
"String",
"[",
"]",
"uncontainedArray",
")",
"{",
"boolean",
"empty",
"=",
"true",
";",
"for",
"(",
"Object",
"ob",
":",
"uncontainedArray",
")",
"{",
"if",
"(",
"ob",
"!=",
"null",
")",
"{",
"e... | This method check if all elements of an array are null.
@param uncontainedArray element in array
@return any element that is found to be empty | [
"This",
"method",
"check",
"if",
"all",
"elements",
"of",
"an",
"array",
"are",
"null",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-lists/src/main/java/io/cloudslang/content/utils/ListProcessor.java#L299-L308 |
108,318 | CloudSlang/cs-actions | cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureHelper.java | AwsSignatureHelper.getSignedHeadersString | public String getSignedHeadersString(Map<String, String> headers) {
List<String> sortedList = new ArrayList<>(headers.keySet());
Collections.sort(sortedList, String.CASE_INSENSITIVE_ORDER);
StringBuilder signedHeaderString = new StringBuilder();
for (String header : sortedList) {
... | java | public String getSignedHeadersString(Map<String, String> headers) {
List<String> sortedList = new ArrayList<>(headers.keySet());
Collections.sort(sortedList, String.CASE_INSENSITIVE_ORDER);
StringBuilder signedHeaderString = new StringBuilder();
for (String header : sortedList) {
... | [
"public",
"String",
"getSignedHeadersString",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"List",
"<",
"String",
">",
"sortedList",
"=",
"new",
"ArrayList",
"<>",
"(",
"headers",
".",
"keySet",
"(",
")",
")",
";",
"Collections",
"... | Creates a comma separated list of headers.
@param headers Headers to be signed.
@return Comma separated list of headers to be signed. | [
"Creates",
"a",
"comma",
"separated",
"list",
"of",
"headers",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureHelper.java#L111-L123 |
108,319 | CloudSlang/cs-actions | cs-database/src/main/java/io/cloudslang/content/database/utils/TripleDES.java | TripleDES.encryptPassword | public static String encryptPassword(@NotNull final String aPlainPass) throws Exception {
byte[] encBytes = encryptString(aPlainPass.getBytes(DEFAULT_CODEPAGE));
return Base64.encodeBase64String(encBytes);
} | java | public static String encryptPassword(@NotNull final String aPlainPass) throws Exception {
byte[] encBytes = encryptString(aPlainPass.getBytes(DEFAULT_CODEPAGE));
return Base64.encodeBase64String(encBytes);
} | [
"public",
"static",
"String",
"encryptPassword",
"(",
"@",
"NotNull",
"final",
"String",
"aPlainPass",
")",
"throws",
"Exception",
"{",
"byte",
"[",
"]",
"encBytes",
"=",
"encryptString",
"(",
"aPlainPass",
".",
"getBytes",
"(",
"DEFAULT_CODEPAGE",
")",
")",
"... | encrypt a plain password
@param aPlainPass a password in plain text
@return an encrypted password
@throws Exception | [
"encrypt",
"a",
"plain",
"password"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/utils/TripleDES.java#L45-L48 |
108,320 | CloudSlang/cs-actions | cs-xml/src/main/java/io/cloudslang/content/xml/utils/DocumentUtils.java | DocumentUtils.documentToString | public static String documentToString(Document xmlDocument) throws IOException {
String encoding = (xmlDocument.getXmlEncoding() == null) ? "UTF-8" : xmlDocument.getXmlEncoding();
OutputFormat format = new OutputFormat(xmlDocument);
format.setLineWidth(65);
format.setIndenting(true);
... | java | public static String documentToString(Document xmlDocument) throws IOException {
String encoding = (xmlDocument.getXmlEncoding() == null) ? "UTF-8" : xmlDocument.getXmlEncoding();
OutputFormat format = new OutputFormat(xmlDocument);
format.setLineWidth(65);
format.setIndenting(true);
... | [
"public",
"static",
"String",
"documentToString",
"(",
"Document",
"xmlDocument",
")",
"throws",
"IOException",
"{",
"String",
"encoding",
"=",
"(",
"xmlDocument",
".",
"getXmlEncoding",
"(",
")",
"==",
"null",
")",
"?",
"\"UTF-8\"",
":",
"xmlDocument",
".",
"... | Returns a String representation for the XML Document.
@param xmlDocument the XML Document
@return String representation for the XML Document
@throws IOException | [
"Returns",
"a",
"String",
"representation",
"for",
"the",
"XML",
"Document",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/utils/DocumentUtils.java#L38-L50 |
108,321 | CloudSlang/cs-actions | cs-xml/src/main/java/io/cloudslang/content/xml/services/ApplyXslTransformationService.java | ApplyXslTransformationService.readSource | private Source readSource(String xmlDocument, String features) throws Exception {
if (xmlDocument.startsWith(Constants.Inputs.HTTP_PREFIX_STRING) || xmlDocument.startsWith(Constants.Inputs.HTTPS_PREFIX_STRING)) {
URL xmlUrl = new URL(xmlDocument);
InputStream xmlStream = xmlUrl.openStrea... | java | private Source readSource(String xmlDocument, String features) throws Exception {
if (xmlDocument.startsWith(Constants.Inputs.HTTP_PREFIX_STRING) || xmlDocument.startsWith(Constants.Inputs.HTTPS_PREFIX_STRING)) {
URL xmlUrl = new URL(xmlDocument);
InputStream xmlStream = xmlUrl.openStrea... | [
"private",
"Source",
"readSource",
"(",
"String",
"xmlDocument",
",",
"String",
"features",
")",
"throws",
"Exception",
"{",
"if",
"(",
"xmlDocument",
".",
"startsWith",
"(",
"Constants",
".",
"Inputs",
".",
"HTTP_PREFIX_STRING",
")",
"||",
"xmlDocument",
".",
... | Reads the xml content from a file, URL or string.
@param xmlDocument xml document as String, path or URL
@return the resulting xml after validation
@throws Exception in case something went wrong | [
"Reads",
"the",
"xml",
"content",
"from",
"a",
"file",
"URL",
"or",
"string",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/services/ApplyXslTransformationService.java#L74-L89 |
108,322 | CloudSlang/cs-actions | cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java | DateTimeUtils.isDateValid | public static boolean isDateValid(String date, Locale locale) {
try {
DateFormat format = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, locale);
format.parse(date);
return true;
} catch (ParseException e) {
return false;
... | java | public static boolean isDateValid(String date, Locale locale) {
try {
DateFormat format = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, locale);
format.parse(date);
return true;
} catch (ParseException e) {
return false;
... | [
"public",
"static",
"boolean",
"isDateValid",
"(",
"String",
"date",
",",
"Locale",
"locale",
")",
"{",
"try",
"{",
"DateFormat",
"format",
"=",
"DateFormat",
".",
"getDateTimeInstance",
"(",
"DateFormat",
".",
"DEFAULT",
",",
"DateFormat",
".",
"DEFAULT",
","... | Because the date passed as argument can be in java format, and because not all formats are compatible
with joda-time, this method checks if the date string is valid with java. In this way we can use the
proper DateTime without changing the output.
@param date date passed as argument
@return true if is a java date | [
"Because",
"the",
"date",
"passed",
"as",
"argument",
"can",
"be",
"in",
"java",
"format",
"and",
"because",
"not",
"all",
"formats",
"are",
"compatible",
"with",
"joda",
"-",
"time",
"this",
"method",
"checks",
"if",
"the",
"date",
"string",
"is",
"valid"... | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java#L51-L59 |
108,323 | CloudSlang/cs-actions | cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java | DateTimeUtils.getLocaleByCountry | public static Locale getLocaleByCountry(String lang, String country) {
return StringUtils.isNotBlank(country) ? new Locale(lang, country) : new Locale(lang);
} | java | public static Locale getLocaleByCountry(String lang, String country) {
return StringUtils.isNotBlank(country) ? new Locale(lang, country) : new Locale(lang);
} | [
"public",
"static",
"Locale",
"getLocaleByCountry",
"(",
"String",
"lang",
",",
"String",
"country",
")",
"{",
"return",
"StringUtils",
".",
"isNotBlank",
"(",
"country",
")",
"?",
"new",
"Locale",
"(",
"lang",
",",
"country",
")",
":",
"new",
"Locale",
"(... | Generates the locale
@param lang the language
@param country the country
@return the locale | [
"Generates",
"the",
"locale"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java#L68-L70 |
108,324 | CloudSlang/cs-actions | cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java | DateTimeUtils.getJodaOrJavaDate | public static DateTime getJodaOrJavaDate(final DateTimeFormatter dateFormatter, final String date) throws Exception {
if (DateTimeUtils.isDateValid(date, dateFormatter.getLocale())) {
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, dateFormatter.getLo... | java | public static DateTime getJodaOrJavaDate(final DateTimeFormatter dateFormatter, final String date) throws Exception {
if (DateTimeUtils.isDateValid(date, dateFormatter.getLocale())) {
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, dateFormatter.getLo... | [
"public",
"static",
"DateTime",
"getJodaOrJavaDate",
"(",
"final",
"DateTimeFormatter",
"dateFormatter",
",",
"final",
"String",
"date",
")",
"throws",
"Exception",
"{",
"if",
"(",
"DateTimeUtils",
".",
"isDateValid",
"(",
"date",
",",
"dateFormatter",
".",
"getLo... | Returns a LocalDateTime depending on how the date passes as argument is formatted.
@param date date passed as argument
@return the DateTime if it could parse it | [
"Returns",
"a",
"LocalDateTime",
"depending",
"on",
"how",
"the",
"date",
"passes",
"as",
"argument",
"is",
"formatted",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java#L78-L89 |
108,325 | CloudSlang/cs-actions | cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java | DateTimeUtils.getDateFormatter | public static DateTimeFormatter getDateFormatter(String format, String lang, String country) {
if (StringUtils.isNotBlank(format)) {
DateTimeFormatter dateFormat = DateTimeFormat.forPattern(format);
if (StringUtils.isNotBlank(lang)) {
return dateFormat.withLocale(Date... | java | public static DateTimeFormatter getDateFormatter(String format, String lang, String country) {
if (StringUtils.isNotBlank(format)) {
DateTimeFormatter dateFormat = DateTimeFormat.forPattern(format);
if (StringUtils.isNotBlank(lang)) {
return dateFormat.withLocale(Date... | [
"public",
"static",
"DateTimeFormatter",
"getDateFormatter",
"(",
"String",
"format",
",",
"String",
"lang",
",",
"String",
"country",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"format",
")",
")",
"{",
"DateTimeFormatter",
"dateFormat",
"=",
... | Generates a DateTimeFormatter using a custom pattern with the default locale or a new one
according to what language and country are provided as params.
@param format the pattern
@param lang the language
@param country the country
@return the DateTimeFormatter generated | [
"Generates",
"a",
"DateTimeFormatter",
"using",
"a",
"custom",
"pattern",
"with",
"the",
"default",
"locale",
"or",
"a",
"new",
"one",
"according",
"to",
"what",
"language",
"and",
"country",
"are",
"provided",
"as",
"params",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java#L101-L110 |
108,326 | CloudSlang/cs-actions | cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java | DateTimeUtils.formatWithDefault | public static DateTimeFormatter formatWithDefault(String lang, String country) {
return (StringUtils.isNotBlank(lang)) ? DateTimeFormat.longDateTime().withLocale(DateTimeUtils.getLocaleByCountry(lang, country)) :
DateTimeFormat.longDateTime().withLocale(Locale.getDefault());
} | java | public static DateTimeFormatter formatWithDefault(String lang, String country) {
return (StringUtils.isNotBlank(lang)) ? DateTimeFormat.longDateTime().withLocale(DateTimeUtils.getLocaleByCountry(lang, country)) :
DateTimeFormat.longDateTime().withLocale(Locale.getDefault());
} | [
"public",
"static",
"DateTimeFormatter",
"formatWithDefault",
"(",
"String",
"lang",
",",
"String",
"country",
")",
"{",
"return",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"lang",
")",
")",
"?",
"DateTimeFormat",
".",
"longDateTime",
"(",
")",
".",
"withLoc... | Generates a DateTimeFormatter using full date pattern with the default locale or a new one
according to what language and country are provided as params.
@param lang the language
@param country the country
@return the DateTimeFormatter generated | [
"Generates",
"a",
"DateTimeFormatter",
"using",
"full",
"date",
"pattern",
"with",
"the",
"default",
"locale",
"or",
"a",
"new",
"one",
"according",
"to",
"what",
"language",
"and",
"country",
"are",
"provided",
"as",
"params",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DateTimeUtils.java#L120-L123 |
108,327 | CloudSlang/cs-actions | cs-database/src/main/java/io/cloudslang/content/database/services/SQLQueryTabularService.java | SQLQueryTabularService.execSqlQueryTabular | public static String execSqlQueryTabular(@NotNull final SQLInputs sqlInputs) throws Exception {
ConnectionService connectionService = new ConnectionService();
try (final Connection connection = connectionService.setUpConnection(sqlInputs)){
connection.setReadOnly(true);
fin... | java | public static String execSqlQueryTabular(@NotNull final SQLInputs sqlInputs) throws Exception {
ConnectionService connectionService = new ConnectionService();
try (final Connection connection = connectionService.setUpConnection(sqlInputs)){
connection.setReadOnly(true);
fin... | [
"public",
"static",
"String",
"execSqlQueryTabular",
"(",
"@",
"NotNull",
"final",
"SQLInputs",
"sqlInputs",
")",
"throws",
"Exception",
"{",
"ConnectionService",
"connectionService",
"=",
"new",
"ConnectionService",
"(",
")",
";",
"try",
"(",
"final",
"Connection",... | Run a SQL query with given configuration
@return the formatted result set by colDelimiter and rowDelimiter
@throws ClassNotFoundException
@throws java.sql.SQLException | [
"Run",
"a",
"SQL",
"query",
"with",
"given",
"configuration"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/SQLQueryTabularService.java#L40-L54 |
108,328 | CloudSlang/cs-actions | cs-xml/src/main/java/io/cloudslang/content/xml/actions/XpathQuery.java | XpathQuery.execute | @Action(name = "XpathQuery",
outputs = {
@Output(RETURN_CODE),
@Output(RETURN_RESULT),
@Output(SELECTED_VALUE),
@Output(ERROR_MESSAGE)},
responses = {
@Response(text = ResponseNames.SUCCESS, field... | java | @Action(name = "XpathQuery",
outputs = {
@Output(RETURN_CODE),
@Output(RETURN_RESULT),
@Output(SELECTED_VALUE),
@Output(ERROR_MESSAGE)},
responses = {
@Response(text = ResponseNames.SUCCESS, field... | [
"@",
"Action",
"(",
"name",
"=",
"\"XpathQuery\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RETURN_CODE",
")",
",",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"SELECTED_VALUE",
")",
",",
"@",
"Output",
"(",
"ERROR_MESSAGE",
... | Selects from an XML document using an XPATH query.
@param xmlDocument XML string or path to xml file
@param xmlDocumentSource The source type of the xml document.
Valid values: xmlString, xmlPath
Default value: xmlString
@param xPathQuery XPATH query
@param queryType type of selection result from ... | [
"Selects",
"from",
"an",
"XML",
"document",
"using",
"an",
"XPATH",
"query",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/actions/XpathQuery.java#L42-L72 |
108,329 | CloudSlang/cs-actions | cs-xml/src/main/java/io/cloudslang/content/xml/actions/ConvertJsonToXml.java | ConvertJsonToXml.execute | @Action(name = "Convert JSON to XML",
outputs = {
@Output(RETURN_RESULT),
@Output(RETURN_CODE)
},
responses = {
@Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS),
@Response(tex... | java | @Action(name = "Convert JSON to XML",
outputs = {
@Output(RETURN_RESULT),
@Output(RETURN_CODE)
},
responses = {
@Response(text = ResponseNames.SUCCESS, field = RETURN_CODE, value = SUCCESS),
@Response(tex... | [
"@",
"Action",
"(",
"name",
"=",
"\"Convert JSON to XML\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"RETURN_CODE",
")",
"}",
",",
"responses",
"=",
"{",
"@",
"Response",
"(",
"text",
"=",
"ResponseName... | Converts a JSON array or a JSON object to a XML document.
@param json - The JSON array or object (in the form of a String).
@param prettyPrint - The flag for formatting the resulted XML. If it is true the result will contain tabs and newline ('\n') chars.
Default value: true
Valid valu... | [
"Converts",
"a",
"JSON",
"array",
"or",
"a",
"JSON",
"object",
"to",
"a",
"XML",
"document",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-xml/src/main/java/io/cloudslang/content/xml/actions/ConvertJsonToXml.java#L62-L108 |
108,330 | CloudSlang/cs-actions | cs-postgres/src/main/java/io/cloudslang/content/postgres/actions/UpdatePgHbaConfigAction.java | UpdatePgHbaConfigAction.execute | @Action(name = "Update pg_hba.config",
outputs = {
@Output(RETURN_CODE),
@Output(RETURN_RESULT),
@Output(EXCEPTION),
@Output(STDERR)
},
responses = {
@Response(text = ResponseNames.SUC... | java | @Action(name = "Update pg_hba.config",
outputs = {
@Output(RETURN_CODE),
@Output(RETURN_RESULT),
@Output(EXCEPTION),
@Output(STDERR)
},
responses = {
@Response(text = ResponseNames.SUC... | [
"@",
"Action",
"(",
"name",
"=",
"\"Update pg_hba.config\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RETURN_CODE",
")",
",",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"EXCEPTION",
")",
",",
"@",
"Output",
"(",
"STDERR",
... | Updates the Postgres config pg_hba.config
@param installationPath The full path to the PostgreSQL configuration file in the local machine to be updated.
@param allowedHosts A wildcard or a comma-separated list of hostnames or IPs (IPv4 or IPv6).
@param allowedUsers A comma-separated list of PostgreSQL users. I... | [
"Updates",
"the",
"Postgres",
"config",
"pg_hba",
".",
"config"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-postgres/src/main/java/io/cloudslang/content/postgres/actions/UpdatePgHbaConfigAction.java#L49-L91 |
108,331 | CloudSlang/cs-actions | cs-tesseract/src/main/java/io/cloudslang/content/tesseract/actions/ExtractTextFromImage.java | ExtractTextFromImage.execute | @Action(name = "Extract text from image",
description = EXTRACT_TEXT_FROM_IMAGE_DESC,
outputs = {
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),
@Output(va... | java | @Action(name = "Extract text from image",
description = EXTRACT_TEXT_FROM_IMAGE_DESC,
outputs = {
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),
@Output(va... | [
"@",
"Action",
"(",
"name",
"=",
"\"Extract text from image\"",
",",
"description",
"=",
"EXTRACT_TEXT_FROM_IMAGE_DESC",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"value",
"=",
"RETURN_CODE",
",",
"description",
"=",
"RETURN_CODE_DESC",
")",
",",
"@",
"Outpu... | This operation extracts the text from a specified file given as input using Tesseract's OCR library.
@param filePath The path of the file to be extracted. The file must be an image. Most of the common image formats
are supported.
Required
@param dataPath The path to the tessdata folder that contains the tesseract ... | [
"This",
"operation",
"extracts",
"the",
"text",
"from",
"a",
"specified",
"file",
"given",
"as",
"input",
"using",
"Tesseract",
"s",
"OCR",
"library",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-tesseract/src/main/java/io/cloudslang/content/tesseract/actions/ExtractTextFromImage.java#L81-L124 |
108,332 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/utils/WSManUtils.java | WSManUtils.isUUID | public static boolean isUUID(String string) {
try {
if (string != null) {
UUID.fromString(string);
return true;
} else {
return false;
}
} catch (IllegalArgumentException ex) {
return false;
}
} | java | public static boolean isUUID(String string) {
try {
if (string != null) {
UUID.fromString(string);
return true;
} else {
return false;
}
} catch (IllegalArgumentException ex) {
return false;
}
} | [
"public",
"static",
"boolean",
"isUUID",
"(",
"String",
"string",
")",
"{",
"try",
"{",
"if",
"(",
"string",
"!=",
"null",
")",
"{",
"UUID",
".",
"fromString",
"(",
"string",
")",
";",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
... | Checks if a string is a valid UUID or not.
@param string The UUID value.
@return true if input is a valid UUID or false if input is empty or an invalid UUID format. | [
"Checks",
"if",
"a",
"string",
"is",
"a",
"valid",
"UUID",
"or",
"not",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/utils/WSManUtils.java#L98-L109 |
108,333 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/utils/WSManUtils.java | WSManUtils.validateUUID | public static void validateUUID(String uuid, String uuidValueOf) throws RuntimeException {
if (!WSManUtils.isUUID(uuid)) {
throw new RuntimeException("The returned " + uuidValueOf + " is not a valid UUID value! " + uuidValueOf + ": " + uuid);
}
} | java | public static void validateUUID(String uuid, String uuidValueOf) throws RuntimeException {
if (!WSManUtils.isUUID(uuid)) {
throw new RuntimeException("The returned " + uuidValueOf + " is not a valid UUID value! " + uuidValueOf + ": " + uuid);
}
} | [
"public",
"static",
"void",
"validateUUID",
"(",
"String",
"uuid",
",",
"String",
"uuidValueOf",
")",
"throws",
"RuntimeException",
"{",
"if",
"(",
"!",
"WSManUtils",
".",
"isUUID",
"(",
"uuid",
")",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"The ... | Validates a UUID value and throws a specific exception if UUID is invalid.
@param uuid The UUID value to validate.
@param uuidValueOf The property associated to the given UUID value.
@throws RuntimeException | [
"Validates",
"a",
"UUID",
"value",
"and",
"throws",
"a",
"specific",
"exception",
"if",
"UUID",
"is",
"invalid",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/utils/WSManUtils.java#L118-L122 |
108,334 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/utils/WSManUtils.java | WSManUtils.verifyScriptExecutionStatus | public static void verifyScriptExecutionStatus(final Map<String, String> resultMap) {
if (ZERO_SCRIPT_EXIT_CODE.equals(resultMap.get(SCRIPT_EXIT_CODE))) {
resultMap.put(RETURN_CODE, RETURN_CODE_SUCCESS);
} else {
resultMap.put(RETURN_CODE, RETURN_CODE_FAILURE);
}
} | java | public static void verifyScriptExecutionStatus(final Map<String, String> resultMap) {
if (ZERO_SCRIPT_EXIT_CODE.equals(resultMap.get(SCRIPT_EXIT_CODE))) {
resultMap.put(RETURN_CODE, RETURN_CODE_SUCCESS);
} else {
resultMap.put(RETURN_CODE, RETURN_CODE_FAILURE);
}
} | [
"public",
"static",
"void",
"verifyScriptExecutionStatus",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"resultMap",
")",
"{",
"if",
"(",
"ZERO_SCRIPT_EXIT_CODE",
".",
"equals",
"(",
"resultMap",
".",
"get",
"(",
"SCRIPT_EXIT_CODE",
")",
")",
")",
... | Checks the scriptExitCode value of the script execution and fails the operation if exit code is different than zero.
@param resultMap | [
"Checks",
"the",
"scriptExitCode",
"value",
"of",
"the",
"script",
"execution",
"and",
"fails",
"the",
"operation",
"if",
"exit",
"code",
"is",
"different",
"than",
"zero",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/utils/WSManUtils.java#L162-L168 |
108,335 | CloudSlang/cs-actions | cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/OffsetTimeBy.java | OffsetTimeBy.execute | @Action(name = "Offset Time By",
description = "Changes the time represented by a date by the specified number of seconds",
outputs = {
@Output(RETURN_RESULT),
@Output(RETURN_CODE),
@Output(EXCEPTION)
},
response... | java | @Action(name = "Offset Time By",
description = "Changes the time represented by a date by the specified number of seconds",
outputs = {
@Output(RETURN_RESULT),
@Output(RETURN_CODE),
@Output(EXCEPTION)
},
response... | [
"@",
"Action",
"(",
"name",
"=",
"\"Offset Time By\"",
",",
"description",
"=",
"\"Changes the time represented by a date by the specified number of seconds\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"RETURN_CODE",
... | Changes the time represented by a date by the specified number of seconds.
If locale is specified, it will return the date and time string based on the locale.
Otherwise, default locale will be used.
@param date Current time.
@param offset The offset value specified number of seconds.
@param localeLang... | [
"Changes",
"the",
"time",
"represented",
"by",
"a",
"date",
"by",
"the",
"specified",
"number",
"of",
"seconds",
".",
"If",
"locale",
"is",
"specified",
"it",
"will",
"return",
"the",
"date",
"and",
"time",
"string",
"based",
"on",
"the",
"locale",
".",
... | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/OffsetTimeBy.java#L62-L83 |
108,336 | CloudSlang/cs-actions | cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/cloudformation/ListStacksAction.java | ListStacksAction.execute | @Action(name = "List AWS Cloud Formation stacks",
outputs = {
@Output(Outputs.RETURN_CODE),
@Output(Outputs.RETURN_RESULT),
@Output(Outputs.EXCEPTION)
},
responses = {
@Response(text = Outputs.SUCC... | java | @Action(name = "List AWS Cloud Formation stacks",
outputs = {
@Output(Outputs.RETURN_CODE),
@Output(Outputs.RETURN_RESULT),
@Output(Outputs.EXCEPTION)
},
responses = {
@Response(text = Outputs.SUCC... | [
"@",
"Action",
"(",
"name",
"=",
"\"List AWS Cloud Formation stacks\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"Outputs",
".",
"RETURN_CODE",
")",
",",
"@",
"Output",
"(",
"Outputs",
".",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"Outputs",
"."... | List AWS Cloud Formation Stacks
@param identity Access key associated with your Amazon AWS or IAM account.
Example: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
@param credential Secret access key ID associated with your Amazon AWS or IAM account.
@param proxyHost Optional - proxy server used to connect to A... | [
"List",
"AWS",
"Cloud",
"Formation",
"Stacks"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/cloudformation/ListStacksAction.java#L61-L106 |
108,337 | CloudSlang/cs-actions | cs-lists/src/main/java/io/cloudslang/content/actions/ListSizeAction.java | ListSizeAction.getListSize | @Action(name = "List Size",
outputs = {
@Output(RESULT_TEXT),
@Output(RESPONSE),
@Output(RETURN_RESULT),
@Output(RETURN_CODE)
},
responses = {
@Response(text = Constants.ResponseNames.... | java | @Action(name = "List Size",
outputs = {
@Output(RESULT_TEXT),
@Output(RESPONSE),
@Output(RETURN_RESULT),
@Output(RETURN_CODE)
},
responses = {
@Response(text = Constants.ResponseNames.... | [
"@",
"Action",
"(",
"name",
"=",
"\"List Size\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"RESULT_TEXT",
")",
",",
"@",
"Output",
"(",
"RESPONSE",
")",
",",
"@",
"Output",
"(",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"RETURN_CODE",
")",
... | This method returns the length of a list of strings.
@param list The list to be processed.
@param delimiter The list delimiter.
@return The length of the list. | [
"This",
"method",
"returns",
"the",
"length",
"of",
"a",
"list",
"of",
"strings",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-lists/src/main/java/io/cloudslang/content/actions/ListSizeAction.java#L53-L80 |
108,338 | CloudSlang/cs-actions | cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/PooledDataSourceProvider.java | PooledDataSourceProvider.getPropStringValue | protected String getPropStringValue(String aPropName, String aDefaultValue) {
return dbPoolingProperties.getProperty(aPropName,
aDefaultValue);
} | java | protected String getPropStringValue(String aPropName, String aDefaultValue) {
return dbPoolingProperties.getProperty(aPropName,
aDefaultValue);
} | [
"protected",
"String",
"getPropStringValue",
"(",
"String",
"aPropName",
",",
"String",
"aDefaultValue",
")",
"{",
"return",
"dbPoolingProperties",
".",
"getProperty",
"(",
"aPropName",
",",
"aDefaultValue",
")",
";",
"}"
] | get string value based on the property name from property file
the property file is databasePooling.properties
@param aPropName a property name
@param aDefaultValue a default value for that property, if the property is not there.
@return string value of that property | [
"get",
"string",
"value",
"based",
"on",
"the",
"property",
"name",
"from",
"property",
"file",
"the",
"property",
"file",
"is",
"databasePooling",
".",
"properties"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/PooledDataSourceProvider.java#L171-L174 |
108,339 | CloudSlang/cs-actions | cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java | AwsSignatureV4.getStringToSign | public String getStringToSign(String requestDate, String credentialScope, String canonicalRequest) throws SignatureException {
try {
return AWS4_SIGNING_ALGORITHM + LINE_SEPARATOR + requestDate + LINE_SEPARATOR + credentialScope + LINE_SEPARATOR +
new String(Hex.encode(calculateH... | java | public String getStringToSign(String requestDate, String credentialScope, String canonicalRequest) throws SignatureException {
try {
return AWS4_SIGNING_ALGORITHM + LINE_SEPARATOR + requestDate + LINE_SEPARATOR + credentialScope + LINE_SEPARATOR +
new String(Hex.encode(calculateH... | [
"public",
"String",
"getStringToSign",
"(",
"String",
"requestDate",
",",
"String",
"credentialScope",
",",
"String",
"canonicalRequest",
")",
"throws",
"SignatureException",
"{",
"try",
"{",
"return",
"AWS4_SIGNING_ALGORITHM",
"+",
"LINE_SEPARATOR",
"+",
"requestDate",... | Combines the inputs into a string with a fixed structure and calculates the canonical request digest.
This string can be used with the derived signing key to create an AWS signature.
@param requestDate Request date in YYYYMMDD'T'HHMMSS'Z' format.
@param credentialScope Request credential scope.
@param canonicalR... | [
"Combines",
"the",
"inputs",
"into",
"a",
"string",
"with",
"a",
"fixed",
"structure",
"and",
"calculates",
"the",
"canonical",
"request",
"digest",
".",
"This",
"string",
"can",
"be",
"used",
"with",
"the",
"derived",
"signing",
"key",
"to",
"create",
"an",... | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java#L81-L88 |
108,340 | CloudSlang/cs-actions | cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java | AwsSignatureV4.getDerivedSigningKey | public byte[] getDerivedSigningKey(String secretAccessKey, String dateStamp, String region, String amazonApi)
throws SignatureException {
try {
byte[] kSecret = (AWS_SIGNATURE_VERSION + secretAccessKey).getBytes(ENCODING);
byte[] kDate = calculateHmacSHA256(dateStamp, kSecret... | java | public byte[] getDerivedSigningKey(String secretAccessKey, String dateStamp, String region, String amazonApi)
throws SignatureException {
try {
byte[] kSecret = (AWS_SIGNATURE_VERSION + secretAccessKey).getBytes(ENCODING);
byte[] kDate = calculateHmacSHA256(dateStamp, kSecret... | [
"public",
"byte",
"[",
"]",
"getDerivedSigningKey",
"(",
"String",
"secretAccessKey",
",",
"String",
"dateStamp",
",",
"String",
"region",
",",
"String",
"amazonApi",
")",
"throws",
"SignatureException",
"{",
"try",
"{",
"byte",
"[",
"]",
"kSecret",
"=",
"(",
... | Derives a signing key from the AWS secret access key.
@param secretAccessKey Amazon secret a access key.
@param dateStamp Credential scope date stamp in "yyyyMMdd" format.
@param region Amazon region name.
@param amazonApi Amazon service name.
@return Signing key's bytes. This result is not encode... | [
"Derives",
"a",
"signing",
"key",
"from",
"the",
"AWS",
"secret",
"access",
"key",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java#L99-L111 |
108,341 | CloudSlang/cs-actions | cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java | AwsSignatureV4.calculateHmacSHA256 | private byte[] calculateHmacSHA256(String data, byte[] key)
throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException {
Mac mac = Mac.getInstance(HMAC_ALGORITHM);
mac.init(new SecretKeySpec(key, HMAC_ALGORITHM));
return mac.doFinal(data.getBytes(ENCODING));
... | java | private byte[] calculateHmacSHA256(String data, byte[] key)
throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException {
Mac mac = Mac.getInstance(HMAC_ALGORITHM);
mac.init(new SecretKeySpec(key, HMAC_ALGORITHM));
return mac.doFinal(data.getBytes(ENCODING));
... | [
"private",
"byte",
"[",
"]",
"calculateHmacSHA256",
"(",
"String",
"data",
",",
"byte",
"[",
"]",
"key",
")",
"throws",
"NoSuchAlgorithmException",
",",
"InvalidKeyException",
",",
"UnsupportedEncodingException",
"{",
"Mac",
"mac",
"=",
"Mac",
".",
"getInstance",
... | Calculates the keyed-hash message authentication code for the data string.
@param data String for which the HMAC will be calculated.
@param key Key used for HMAC calculation.
@return HMAC's bytes. This result is not encoded. | [
"Calculates",
"the",
"keyed",
"-",
"hash",
"message",
"authentication",
"code",
"for",
"the",
"data",
"string",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java#L147-L152 |
108,342 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java | VmService.getOsDescriptors | public Map<String, String> getOsDescriptors(HttpInputs httpInputs, VmInputs vmInputs, String delimiter) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference environmentBrowserMor = new MorObjectHandler()
... | java | public Map<String, String> getOsDescriptors(HttpInputs httpInputs, VmInputs vmInputs, String delimiter) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference environmentBrowserMor = new MorObjectHandler()
... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getOsDescriptors",
"(",
"HttpInputs",
"httpInputs",
",",
"VmInputs",
"vmInputs",
",",
"String",
"delimiter",
")",
"throws",
"Exception",
"{",
"ConnectionResources",
"connectionResources",
"=",
"new",
"ConnectionRe... | Method used to connect to data center to retrieve a list with all the guest operating system descriptors
supported by the host system.
@param httpInputs Object that has all the inputs necessary to made a connection to data center
@param vmInputs Object that has all the specific inputs necessary to identify the targe... | [
"Method",
"used",
"to",
"connect",
"to",
"data",
"center",
"to",
"retrieve",
"a",
"list",
"with",
"all",
"the",
"guest",
"operating",
"system",
"descriptors",
"supported",
"by",
"the",
"host",
"system",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java#L52-L72 |
108,343 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java | VmService.createVM | public Map<String, String> createVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
VmUtils utils = new VmUtils();
ManagedObjectReference vmFolderMor = utils.getMorFolder(v... | java | public Map<String, String> createVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
VmUtils utils = new VmUtils();
ManagedObjectReference vmFolderMor = utils.getMorFolder(v... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"createVM",
"(",
"HttpInputs",
"httpInputs",
",",
"VmInputs",
"vmInputs",
")",
"throws",
"Exception",
"{",
"ConnectionResources",
"connectionResources",
"=",
"new",
"ConnectionResources",
"(",
"httpInputs",
",",
... | Method used to connect to specified data center and create a virtual machine using the inputs provided.
@param httpInputs Object that has all the inputs necessary to made a connection to data center
@param vmInputs Object that has all the specific inputs necessary to create a new virtual machine
@return Map with Str... | [
"Method",
"used",
"to",
"connect",
"to",
"specified",
"data",
"center",
"and",
"create",
"a",
"virtual",
"machine",
"using",
"the",
"inputs",
"provided",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java#L83-L107 |
108,344 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java | VmService.deleteVM | public Map<String, String> deleteVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
... | java | public Map<String, String> deleteVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"deleteVM",
"(",
"HttpInputs",
"httpInputs",
",",
"VmInputs",
"vmInputs",
")",
"throws",
"Exception",
"{",
"ConnectionResources",
"connectionResources",
"=",
"new",
"ConnectionResources",
"(",
"httpInputs",
",",
... | Method used to connect to specified data center and delete the virtual machine identified by the inputs provided.
@param httpInputs Object that has all the inputs necessary to made a connection to data center
@param vmInputs Object that has all the specific inputs necessary to identify the targeted virtual machine
@... | [
"Method",
"used",
"to",
"connect",
"to",
"specified",
"data",
"center",
"and",
"delete",
"the",
"virtual",
"machine",
"identified",
"by",
"the",
"inputs",
"provided",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java#L118-L140 |
108,345 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java | VmService.listVMsAndTemplates | public Map<String, String> listVMsAndTemplates(HttpInputs httpInputs, VmInputs vmInputs, String delimiter) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
Map<String, ManagedObjectReference> virtualMachinesMorMap = new MorObje... | java | public Map<String, String> listVMsAndTemplates(HttpInputs httpInputs, VmInputs vmInputs, String delimiter) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
Map<String, ManagedObjectReference> virtualMachinesMorMap = new MorObje... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"listVMsAndTemplates",
"(",
"HttpInputs",
"httpInputs",
",",
"VmInputs",
"vmInputs",
",",
"String",
"delimiter",
")",
"throws",
"Exception",
"{",
"ConnectionResources",
"connectionResources",
"=",
"new",
"Connectio... | Method used to connect to data center to retrieve a list with all the virtual machines and templates within.
@param httpInputs Object that has all the inputs necessary to made a connection to data center
@param vmInputs Object that has all the specific inputs necessary to identify the targeted data center
@param del... | [
"Method",
"used",
"to",
"connect",
"to",
"data",
"center",
"to",
"retrieve",
"a",
"list",
"with",
"all",
"the",
"virtual",
"machines",
"and",
"templates",
"within",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java#L218-L239 |
108,346 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java | VmService.getVMDetails | public Map<String, String> getVMDetails(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
... | java | public Map<String, String> getVMDetails(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getVMDetails",
"(",
"HttpInputs",
"httpInputs",
",",
"VmInputs",
"vmInputs",
")",
"throws",
"Exception",
"{",
"ConnectionResources",
"connectionResources",
"=",
"new",
"ConnectionResources",
"(",
"httpInputs",
","... | Method used to connect to data center to retrieve details of a virtual machine identified by the inputs provided.
@param httpInputs Object that has all the inputs necessary to made a connection to data center
@param vmInputs Object that has all the specific inputs necessary to identify the targeted virtual machine
@... | [
"Method",
"used",
"to",
"connect",
"to",
"data",
"center",
"to",
"retrieve",
"details",
"of",
"a",
"virtual",
"machine",
"identified",
"by",
"the",
"inputs",
"provided",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java#L250-L283 |
108,347 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java | VmService.updateVM | public Map<String, String> updateVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
... | java | public Map<String, String> updateVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"updateVM",
"(",
"HttpInputs",
"httpInputs",
",",
"VmInputs",
"vmInputs",
")",
"throws",
"Exception",
"{",
"ConnectionResources",
"connectionResources",
"=",
"new",
"ConnectionResources",
"(",
"httpInputs",
",",
... | Method used to connect to data center to update existing devices of a virtual machine identified by the inputs
provided.
@param httpInputs Object that has all the inputs necessary to made a connection to data center
@param vmInputs Object that has all the specific inputs necessary to identify the targeted device
@re... | [
"Method",
"used",
"to",
"connect",
"to",
"data",
"center",
"to",
"update",
"existing",
"devices",
"of",
"a",
"virtual",
"machine",
"identified",
"by",
"the",
"inputs",
"provided",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java#L295-L325 |
108,348 | CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java | VmService.cloneVM | public Map<String, String> cloneVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
... | java | public Map<String, String> cloneVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"cloneVM",
"(",
"HttpInputs",
"httpInputs",
",",
"VmInputs",
"vmInputs",
")",
"throws",
"Exception",
"{",
"ConnectionResources",
"connectionResources",
"=",
"new",
"ConnectionResources",
"(",
"httpInputs",
",",
"... | Method used to connect to data center and clone a virtual machine identified by the inputs provided.
@param httpInputs Object that has all the inputs necessary to made a connection to data center
@param vmInputs Object that has all the specific inputs necessary to identify the virtual machine that will be
cloned
@re... | [
"Method",
"used",
"to",
"connect",
"to",
"data",
"center",
"and",
"clone",
"a",
"virtual",
"machine",
"identified",
"by",
"the",
"inputs",
"provided",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/VmService.java#L337-L372 |
108,349 | CloudSlang/cs-actions | cs-json/src/main/java/io/cloudslang/content/json/actions/MergeArrays.java | MergeArrays.execute | @Action(name = "Merge Arrays",
outputs = {
@Output(OutputNames.RETURN_RESULT),
@Output(OutputNames.RETURN_CODE),
@Output(OutputNames.EXCEPTION)
},
responses = {
@Response(text = ResponseNames.SUCCESS, fie... | java | @Action(name = "Merge Arrays",
outputs = {
@Output(OutputNames.RETURN_RESULT),
@Output(OutputNames.RETURN_CODE),
@Output(OutputNames.EXCEPTION)
},
responses = {
@Response(text = ResponseNames.SUCCESS, fie... | [
"@",
"Action",
"(",
"name",
"=",
"\"Merge Arrays\"",
",",
"outputs",
"=",
"{",
"@",
"Output",
"(",
"OutputNames",
".",
"RETURN_RESULT",
")",
",",
"@",
"Output",
"(",
"OutputNames",
".",
"RETURN_CODE",
")",
",",
"@",
"Output",
"(",
"OutputNames",
".",
"EX... | This operation merge the contents of two JSON arrays. This operation does not modify either of the input arrays.
The result is the contents or array1 and array2, merged into a single array. The merge operation add into the result
the first array and then the second array.
@param array1 The string representation of a J... | [
"This",
"operation",
"merge",
"the",
"contents",
"of",
"two",
"JSON",
"arrays",
".",
"This",
"operation",
"does",
"not",
"modify",
"either",
"of",
"the",
"input",
"arrays",
".",
"The",
"result",
"is",
"the",
"contents",
"or",
"array1",
"and",
"array2",
"me... | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-json/src/main/java/io/cloudslang/content/json/actions/MergeArrays.java#L72-L126 |
108,350 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.runCommand | public Map<String, String> runCommand(WSManRequestInputs wsManRequestInputs) throws RuntimeException, IOException, InterruptedException, ParserConfigurationException, TransformerException, XPathExpressionException, TimeoutException, URISyntaxException, SAXException {
HttpClientService csHttpClient = new HttpCli... | java | public Map<String, String> runCommand(WSManRequestInputs wsManRequestInputs) throws RuntimeException, IOException, InterruptedException, ParserConfigurationException, TransformerException, XPathExpressionException, TimeoutException, URISyntaxException, SAXException {
HttpClientService csHttpClient = new HttpCli... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"runCommand",
"(",
"WSManRequestInputs",
"wsManRequestInputs",
")",
"throws",
"RuntimeException",
",",
"IOException",
",",
"InterruptedException",
",",
"ParserConfigurationException",
",",
"TransformerException",
",",
... | Executes a command on a remote shell by communicating with the WinRM server from the remote host.
Method creates a shell, runs a command on the shell, waits for the command execution to finnish, retrieves the result then deletes the shell.
@param wsManRequestInputs
@return a map with the result of the command and the ... | [
"Executes",
"a",
"command",
"on",
"a",
"remote",
"shell",
"by",
"communicating",
"with",
"the",
"WinRM",
"server",
"from",
"the",
"remote",
"host",
".",
"Method",
"creates",
"a",
"shell",
"runs",
"a",
"command",
"on",
"the",
"shell",
"waits",
"for",
"the",... | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L107-L120 |
108,351 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.setCommonHttpInputs | private static HttpClientInputs setCommonHttpInputs(HttpClientInputs httpClientInputs, URL url, WSManRequestInputs wsManRequestInputs) throws MalformedURLException {
httpClientInputs.setUrl(url.toString());
httpClientInputs.setUsername(wsManRequestInputs.getUsername());
httpClientInputs.setPassw... | java | private static HttpClientInputs setCommonHttpInputs(HttpClientInputs httpClientInputs, URL url, WSManRequestInputs wsManRequestInputs) throws MalformedURLException {
httpClientInputs.setUrl(url.toString());
httpClientInputs.setUsername(wsManRequestInputs.getUsername());
httpClientInputs.setPassw... | [
"private",
"static",
"HttpClientInputs",
"setCommonHttpInputs",
"(",
"HttpClientInputs",
"httpClientInputs",
",",
"URL",
"url",
",",
"WSManRequestInputs",
"wsManRequestInputs",
")",
"throws",
"MalformedURLException",
"{",
"httpClientInputs",
".",
"setUrl",
"(",
"url",
"."... | Configures the HttpClientInputs object with the most common http parameters.
@param httpClientInputs
@param url
@param wsManRequestInputs
@return the configured HttpClientInputs object.
@throws MalformedURLException | [
"Configures",
"the",
"HttpClientInputs",
"object",
"with",
"the",
"most",
"common",
"http",
"parameters",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L131-L157 |
108,352 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.executeRequestWithBody | private Map<String, String> executeRequestWithBody(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, String body) {
httpClientInputs.setBody(body);
Map<String, String> requestResponse = csHttpClient.execute(httpClientInputs);
if (UNAUTHORIZED_STATUS_CODE.equals(requestResponse.g... | java | private Map<String, String> executeRequestWithBody(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, String body) {
httpClientInputs.setBody(body);
Map<String, String> requestResponse = csHttpClient.execute(httpClientInputs);
if (UNAUTHORIZED_STATUS_CODE.equals(requestResponse.g... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"executeRequestWithBody",
"(",
"HttpClientService",
"csHttpClient",
",",
"HttpClientInputs",
"httpClientInputs",
",",
"String",
"body",
")",
"{",
"httpClientInputs",
".",
"setBody",
"(",
"body",
")",
";",
"Map",... | This method executes a request with the given CSHttpClient, HttpClientInputs and body.
@param csHttpClient
@param httpClientInputs
@param body
@return the result of the request execution. | [
"This",
"method",
"executes",
"a",
"request",
"with",
"the",
"given",
"CSHttpClient",
"HttpClientInputs",
"and",
"body",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L167-L174 |
108,353 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.createShell | private String createShell(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, WSManRequestInputs wsManRequestInputs)
throws RuntimeException, IOException, URISyntaxException,
XPathExpressionException, SAXException, ParserConfigurationException {
String document = Resource... | java | private String createShell(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, WSManRequestInputs wsManRequestInputs)
throws RuntimeException, IOException, URISyntaxException,
XPathExpressionException, SAXException, ParserConfigurationException {
String document = Resource... | [
"private",
"String",
"createShell",
"(",
"HttpClientService",
"csHttpClient",
",",
"HttpClientInputs",
"httpClientInputs",
",",
"WSManRequestInputs",
"wsManRequestInputs",
")",
"throws",
"RuntimeException",
",",
"IOException",
",",
"URISyntaxException",
",",
"XPathExpressionE... | Creates a shell on the remote server and returns the shell id.
@param csHttpClient
@param httpClientInputs
@param wsManRequestInputs
@return the id of the created shell.
@throws RuntimeException
@throws IOException
@throws URISyntaxException
@throws TransformerException
@throws XPathExpressionException
@throws SAXExce... | [
"Creates",
"a",
"shell",
"on",
"the",
"remote",
"server",
"and",
"returns",
"the",
"shell",
"id",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L191-L200 |
108,354 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.executeCommand | private String executeCommand(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, String shellId,
WSManRequestInputs wsManRequestInputs, String command) throws RuntimeException,
IOException, URISyntaxException, TransformerException, XPathExpressionException, ... | java | private String executeCommand(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, String shellId,
WSManRequestInputs wsManRequestInputs, String command) throws RuntimeException,
IOException, URISyntaxException, TransformerException, XPathExpressionException, ... | [
"private",
"String",
"executeCommand",
"(",
"HttpClientService",
"csHttpClient",
",",
"HttpClientInputs",
"httpClientInputs",
",",
"String",
"shellId",
",",
"WSManRequestInputs",
"wsManRequestInputs",
",",
"String",
"command",
")",
"throws",
"RuntimeException",
",",
"IOEx... | Executes a command on the given shell.
@param csHttpClient
@param httpClientInputs
@param shellId
@param wsManRequestInputs
@return the command id.
@throws RuntimeException
@throws IOException
@throws URISyntaxException
@throws TransformerException
@throws XPathExpressionException
@throws SAXException
@throws ParserCo... | [
"Executes",
"a",
"command",
"on",
"the",
"given",
"shell",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L218-L228 |
108,355 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.receiveCommandResult | private Map<String, String> receiveCommandResult(HttpClientService csHttpClient, HttpClientInputs httpClientInputs,
String shellId, String commandId, WSManRequestInputs wsManRequestInputs) throws RuntimeException,
IOException, URISyntaxException, Transfor... | java | private Map<String, String> receiveCommandResult(HttpClientService csHttpClient, HttpClientInputs httpClientInputs,
String shellId, String commandId, WSManRequestInputs wsManRequestInputs) throws RuntimeException,
IOException, URISyntaxException, Transfor... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"receiveCommandResult",
"(",
"HttpClientService",
"csHttpClient",
",",
"HttpClientInputs",
"httpClientInputs",
",",
"String",
"shellId",
",",
"String",
"commandId",
",",
"WSManRequestInputs",
"wsManRequestInputs",
")"... | Waits for a specific command that is running on a remote shell to finnish it's execution.
@param csHttpClient
@param httpClientInputs
@param shellId
@param commandId
@param wsManRequestInputs
@return the command execution result and exit code.
@throws RuntimeException
@throws IOException
@throws URISyntaxException
@th... | [
"Waits",
"for",
"a",
"specific",
"command",
"that",
"is",
"running",
"on",
"a",
"remote",
"shell",
"to",
"finnish",
"it",
"s",
"execution",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L249-L274 |
108,356 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.getResourceId | private String getResourceId(String response, String resourceResponseAction, String resourceIdXpath, String resourceIdExceptionMessage) throws ParserConfigurationException, SAXException, XPathExpressionException, IOException {
if (WSManUtils.isSpecificResponseAction(response, resourceResponseAction)) {
... | java | private String getResourceId(String response, String resourceResponseAction, String resourceIdXpath, String resourceIdExceptionMessage) throws ParserConfigurationException, SAXException, XPathExpressionException, IOException {
if (WSManUtils.isSpecificResponseAction(response, resourceResponseAction)) {
... | [
"private",
"String",
"getResourceId",
"(",
"String",
"response",
",",
"String",
"resourceResponseAction",
",",
"String",
"resourceIdXpath",
",",
"String",
"resourceIdExceptionMessage",
")",
"throws",
"ParserConfigurationException",
",",
"SAXException",
",",
"XPathExpression... | This method retrieves the resource id from the create resource request response and throws the appropriate exceptions in case of failure.
@param response
@param resourceResponseAction
@param resourceIdXpath
@param resourceIdExceptionMessage
@return
@throws ParserConfigurationException
@throws SAXException
@throws XPat... | [
"This",
"method",
"retrieves",
"the",
"resource",
"id",
"from",
"the",
"create",
"resource",
"request",
"response",
"and",
"throws",
"the",
"appropriate",
"exceptions",
"in",
"case",
"of",
"failure",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L289-L302 |
108,357 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.deleteShell | private void deleteShell(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, String shellId, WSManRequestInputs wsManRequestInputs)
throws RuntimeException, IOException, URISyntaxException, TransformerException, XPathExpressionException, SAXException, ParserConfigurationException {
St... | java | private void deleteShell(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, String shellId, WSManRequestInputs wsManRequestInputs)
throws RuntimeException, IOException, URISyntaxException, TransformerException, XPathExpressionException, SAXException, ParserConfigurationException {
St... | [
"private",
"void",
"deleteShell",
"(",
"HttpClientService",
"csHttpClient",
",",
"HttpClientInputs",
"httpClientInputs",
",",
"String",
"shellId",
",",
"WSManRequestInputs",
"wsManRequestInputs",
")",
"throws",
"RuntimeException",
",",
"IOException",
",",
"URISyntaxExceptio... | Deletes the remote shell.
@param csHttpClient
@param httpClientInputs
@param shellId
@param wsManRequestInputs
@throws RuntimeException
@throws IOException
@throws URISyntaxException
@throws TransformerException
@throws XPathExpressionException
@throws SAXException
@throws ParserConfigurationException | [
"Deletes",
"the",
"remote",
"shell",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L319-L331 |
108,358 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.processCommandExecutionResponse | private Map<String, String> processCommandExecutionResponse(Map<String, String> receiveResult) throws ParserConfigurationException, SAXException, XPathExpressionException, IOException {
Map<String, String> scriptResults = new HashMap<>();
scriptResults.put(RETURN_RESULT, buildResultFromResponseStreams(r... | java | private Map<String, String> processCommandExecutionResponse(Map<String, String> receiveResult) throws ParserConfigurationException, SAXException, XPathExpressionException, IOException {
Map<String, String> scriptResults = new HashMap<>();
scriptResults.put(RETURN_RESULT, buildResultFromResponseStreams(r... | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"processCommandExecutionResponse",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"receiveResult",
")",
"throws",
"ParserConfigurationException",
",",
"SAXException",
",",
"XPathExpressionException",
",",
"IOExcepti... | This method separates the stdout and stderr response streams from the received execution response.
@param receiveResult A map containing the response from the service.
@return a map containing the stdout, stderr streams and the script exit code.
@throws ParserConfigurationException
@throws SAXException
@throws XPathEx... | [
"This",
"method",
"separates",
"the",
"stdout",
"and",
"stderr",
"response",
"streams",
"from",
"the",
"received",
"execution",
"response",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L343-L349 |
108,359 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.buildResultFromResponseStreams | private String buildResultFromResponseStreams(String response, OutputStream outputStream) throws ParserConfigurationException, SAXException, XPathExpressionException, IOException {
StringBuilder commandResult = new StringBuilder();
int noOfStreams = WSManUtils.countStreamElements(response);
for ... | java | private String buildResultFromResponseStreams(String response, OutputStream outputStream) throws ParserConfigurationException, SAXException, XPathExpressionException, IOException {
StringBuilder commandResult = new StringBuilder();
int noOfStreams = WSManUtils.countStreamElements(response);
for ... | [
"private",
"String",
"buildResultFromResponseStreams",
"(",
"String",
"response",
",",
"OutputStream",
"outputStream",
")",
"throws",
"ParserConfigurationException",
",",
"SAXException",
",",
"XPathExpressionException",
",",
"IOException",
"{",
"StringBuilder",
"commandResult... | Constructs the executed command response from multiple streams of data containing the encoded result of the execution.
@param response
@param outputStream
@return the decoded result of the command in a string.
@throws ParserConfigurationException
@throws SAXException
@throws XPathExpressionException
@throws IOExceptio... | [
"Constructs",
"the",
"executed",
"command",
"response",
"from",
"multiple",
"streams",
"of",
"data",
"containing",
"the",
"encoded",
"result",
"of",
"the",
"execution",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L362-L372 |
108,360 | CloudSlang/cs-actions | cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java | WSManRemoteShellService.executionIsTimedOut | private boolean executionIsTimedOut(long aStartTime, int aTimeout) {
if (aTimeout != 0) {
long now = System.currentTimeMillis() / 1000;
if ((now - aStartTime) >= aTimeout) {
return true;
}
}
return false;
} | java | private boolean executionIsTimedOut(long aStartTime, int aTimeout) {
if (aTimeout != 0) {
long now = System.currentTimeMillis() / 1000;
if ((now - aStartTime) >= aTimeout) {
return true;
}
}
return false;
} | [
"private",
"boolean",
"executionIsTimedOut",
"(",
"long",
"aStartTime",
",",
"int",
"aTimeout",
")",
"{",
"if",
"(",
"aTimeout",
"!=",
"0",
")",
"{",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"/",
"1000",
";",
"if",
"(",
"(",
"n... | Check whether or not the command execution reach the timeout value.
@param aStartTime A start time in seconds.
@param aTimeout A timeout value in seconds.
@return true if it reaches timeout. | [
"Check",
"whether",
"or",
"not",
"the",
"command",
"execution",
"reach",
"the",
"timeout",
"value",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-powershell/src/main/java/io/cloudslang/content/services/WSManRemoteShellService.java#L381-L389 |
108,361 | CloudSlang/cs-actions | cs-commons/src/main/java/io/cloudslang/content/utils/CollectionUtilities.java | CollectionUtilities.toArrayWithEscaped | @NotNull
public static String[] toArrayWithEscaped(@Nullable final String stringArray, @NotNull final String delimiter) {
if (StringUtils.isEmpty(stringArray)) {
return new String[0];
}
return StringUtils.splitByWholeSeparatorPreserveAllTokens(stringArray, delimiter);
} | java | @NotNull
public static String[] toArrayWithEscaped(@Nullable final String stringArray, @NotNull final String delimiter) {
if (StringUtils.isEmpty(stringArray)) {
return new String[0];
}
return StringUtils.splitByWholeSeparatorPreserveAllTokens(stringArray, delimiter);
} | [
"@",
"NotNull",
"public",
"static",
"String",
"[",
"]",
"toArrayWithEscaped",
"(",
"@",
"Nullable",
"final",
"String",
"stringArray",
",",
"@",
"NotNull",
"final",
"String",
"delimiter",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"stringArray",
... | Splits the stringArray by the delimiter into an array of strings without ignoring the escaped delimiters
@param stringArray the string to be split
@param delimiter the delimiter by which to split the stringArray
@return an array of Strings | [
"Splits",
"the",
"stringArray",
"by",
"the",
"delimiter",
"into",
"an",
"array",
"of",
"strings",
"without",
"ignoring",
"the",
"escaped",
"delimiters"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/CollectionUtilities.java#L48-L54 |
108,362 | CloudSlang/cs-actions | cs-commons/src/main/java/io/cloudslang/content/utils/CollectionUtilities.java | CollectionUtilities.toArray | @NotNull
public static String[] toArray(@Nullable final String stringArray, @NotNull final String delimiter) {
if (StringUtils.isEmpty(stringArray)) {
return new String[0];
}
final String regex = "(?<!\\\\)" + Pattern.quote(delimiter);
return stringArray.split(regex);
... | java | @NotNull
public static String[] toArray(@Nullable final String stringArray, @NotNull final String delimiter) {
if (StringUtils.isEmpty(stringArray)) {
return new String[0];
}
final String regex = "(?<!\\\\)" + Pattern.quote(delimiter);
return stringArray.split(regex);
... | [
"@",
"NotNull",
"public",
"static",
"String",
"[",
"]",
"toArray",
"(",
"@",
"Nullable",
"final",
"String",
"stringArray",
",",
"@",
"NotNull",
"final",
"String",
"delimiter",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"stringArray",
")",
")"... | Splits the stringArray by the delimiter into an array of strings ignoring the escaped delimiters
@param stringArray the string to be split
@param delimiter the delimiter by which to split the stringArray
@return an array of Strings | [
"Splits",
"the",
"stringArray",
"by",
"the",
"delimiter",
"into",
"an",
"array",
"of",
"strings",
"ignoring",
"the",
"escaped",
"delimiters"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/CollectionUtilities.java#L63-L70 |
108,363 | CloudSlang/cs-actions | cs-commons/src/main/java/io/cloudslang/content/utils/CollectionUtilities.java | CollectionUtilities.toListWithEscaped | @NotNull
public static List<String> toListWithEscaped(@Nullable final String stringList, @NotNull final String delimiter) {
return new ArrayList<>(Arrays.asList(toArrayWithEscaped(stringList, delimiter)));
} | java | @NotNull
public static List<String> toListWithEscaped(@Nullable final String stringList, @NotNull final String delimiter) {
return new ArrayList<>(Arrays.asList(toArrayWithEscaped(stringList, delimiter)));
} | [
"@",
"NotNull",
"public",
"static",
"List",
"<",
"String",
">",
"toListWithEscaped",
"(",
"@",
"Nullable",
"final",
"String",
"stringList",
",",
"@",
"NotNull",
"final",
"String",
"delimiter",
")",
"{",
"return",
"new",
"ArrayList",
"<>",
"(",
"Arrays",
".",... | Splits the stringList by the delimiter into a List of strings without ignoring the escaped delimiters
@param stringList the string to be split
@param delimiter the delimiter by which to split the stringArray
@return a list of Strings | [
"Splits",
"the",
"stringList",
"by",
"the",
"delimiter",
"into",
"a",
"List",
"of",
"strings",
"without",
"ignoring",
"the",
"escaped",
"delimiters"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/CollectionUtilities.java#L79-L82 |
108,364 | CloudSlang/cs-actions | cs-commons/src/main/java/io/cloudslang/content/utils/CollectionUtilities.java | CollectionUtilities.toList | @NotNull
public static List<String> toList(@Nullable final String stringList, @NotNull final String delimiter) {
return new ArrayList<>(Arrays.asList(toArray(stringList, delimiter)));
} | java | @NotNull
public static List<String> toList(@Nullable final String stringList, @NotNull final String delimiter) {
return new ArrayList<>(Arrays.asList(toArray(stringList, delimiter)));
} | [
"@",
"NotNull",
"public",
"static",
"List",
"<",
"String",
">",
"toList",
"(",
"@",
"Nullable",
"final",
"String",
"stringList",
",",
"@",
"NotNull",
"final",
"String",
"delimiter",
")",
"{",
"return",
"new",
"ArrayList",
"<>",
"(",
"Arrays",
".",
"asList"... | Splits the stringList by the delimiter into a List of strings ignoring the escaped delimiters
@param stringList the string to be split
@param delimiter the delimiter by which to split the stringArray
@return a list of Strings | [
"Splits",
"the",
"stringList",
"by",
"the",
"delimiter",
"into",
"a",
"List",
"of",
"strings",
"ignoring",
"the",
"escaped",
"delimiters"
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/CollectionUtilities.java#L91-L94 |
108,365 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/RequestBundle.java | RequestBundle.get | public static synchronized RequestBundle get(SlingHttpServletRequest request) {
RequestBundle instance = (RequestBundle) request.getAttribute(ATTRIBUTE_KEY);
if (instance == null) {
instance = new RequestBundle(request);
request.setAttribute(ATTRIBUTE_KEY, instance);
}
... | java | public static synchronized RequestBundle get(SlingHttpServletRequest request) {
RequestBundle instance = (RequestBundle) request.getAttribute(ATTRIBUTE_KEY);
if (instance == null) {
instance = new RequestBundle(request);
request.setAttribute(ATTRIBUTE_KEY, instance);
}
... | [
"public",
"static",
"synchronized",
"RequestBundle",
"get",
"(",
"SlingHttpServletRequest",
"request",
")",
"{",
"RequestBundle",
"instance",
"=",
"(",
"RequestBundle",
")",
"request",
".",
"getAttribute",
"(",
"ATTRIBUTE_KEY",
")",
";",
"if",
"(",
"instance",
"==... | returns the requests instance | [
"returns",
"the",
"requests",
"instance"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/RequestBundle.java#L19-L26 |
108,366 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/ResourceUtil.java | ResourceUtil.getPrimaryType | public static String getPrimaryType(Resource resource) {
String result = null;
if (resource != null) {
if (resource instanceof JcrResource) {
// use the resource itself if it implements the JcrResource interface (maybe a version of a resource)
result = ((JcrRe... | java | public static String getPrimaryType(Resource resource) {
String result = null;
if (resource != null) {
if (resource instanceof JcrResource) {
// use the resource itself if it implements the JcrResource interface (maybe a version of a resource)
result = ((JcrRe... | [
"public",
"static",
"String",
"getPrimaryType",
"(",
"Resource",
"resource",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"resource",
"!=",
"null",
")",
"{",
"if",
"(",
"resource",
"instanceof",
"JcrResource",
")",
"{",
"// use the resource itsel... | retrieves the primary type of the resources node | [
"retrieves",
"the",
"primary",
"type",
"of",
"the",
"resources",
"node"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/ResourceUtil.java#L185-L211 |
108,367 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/ResourceUtil.java | ResourceUtil.getOrCreateChild | public static Resource getOrCreateChild(Resource resource, String relPath, String primaryTypes)
throws RepositoryException {
Resource child = null;
if (resource != null) {
ResourceResolver resolver = resource.getResourceResolver();
String path = resource.getPath();
... | java | public static Resource getOrCreateChild(Resource resource, String relPath, String primaryTypes)
throws RepositoryException {
Resource child = null;
if (resource != null) {
ResourceResolver resolver = resource.getResourceResolver();
String path = resource.getPath();
... | [
"public",
"static",
"Resource",
"getOrCreateChild",
"(",
"Resource",
"resource",
",",
"String",
"relPath",
",",
"String",
"primaryTypes",
")",
"throws",
"RepositoryException",
"{",
"Resource",
"child",
"=",
"null",
";",
"if",
"(",
"resource",
"!=",
"null",
")",
... | Retrieves the resources child resource, creates this child if not existing.
@param resource the resource to extend
@param relPath the path to the requested child resource
@param primaryTypes the 'path' of primary types for the new nodes (optional, can be 'null')
@return the requested child | [
"Retrieves",
"the",
"resources",
"child",
"resource",
"creates",
"this",
"child",
"if",
"not",
"existing",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/ResourceUtil.java#L374-L389 |
108,368 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/ResourceUtil.java | ResourceUtil.isFile | public static boolean isFile(Resource resource) {
Node node = resource.adaptTo(Node.class);
if (node != null) {
try {
NodeType type = node.getPrimaryNodeType();
if (type != null) {
String typeName = type.getName();
switc... | java | public static boolean isFile(Resource resource) {
Node node = resource.adaptTo(Node.class);
if (node != null) {
try {
NodeType type = node.getPrimaryNodeType();
if (type != null) {
String typeName = type.getName();
switc... | [
"public",
"static",
"boolean",
"isFile",
"(",
"Resource",
"resource",
")",
"{",
"Node",
"node",
"=",
"resource",
".",
"adaptTo",
"(",
"Node",
".",
"class",
")",
";",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"try",
"{",
"NodeType",
"type",
"=",
"nod... | Returns 'true' is this resource represents a 'file'. | [
"Returns",
"true",
"is",
"this",
"resource",
"represents",
"a",
"file",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/ResourceUtil.java#L452-L482 |
108,369 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/AbstractServletBean.java | AbstractServletBean.initialize | @Override
public void initialize(BeanContext context) {
Resource resource = ConsoleUtil.getConsoleResource(context);
initialize(context, ResourceHandle.use(resource));
} | java | @Override
public void initialize(BeanContext context) {
Resource resource = ConsoleUtil.getConsoleResource(context);
initialize(context, ResourceHandle.use(resource));
} | [
"@",
"Override",
"public",
"void",
"initialize",
"(",
"BeanContext",
"context",
")",
"{",
"Resource",
"resource",
"=",
"ConsoleUtil",
".",
"getConsoleResource",
"(",
"context",
")",
";",
"initialize",
"(",
"context",
",",
"ResourceHandle",
".",
"use",
"(",
"re... | extract the resource referenced to display in the browsers view as the components resource | [
"extract",
"the",
"resource",
"referenced",
"to",
"display",
"in",
"the",
"browsers",
"view",
"as",
"the",
"components",
"resource"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/AbstractServletBean.java#L31-L35 |
108,370 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/cpnl/TextTag.java | TextTag.renderTagEnd | @Override
protected void renderTagEnd() {
try {
if (StringUtils.isNotEmpty(this.output)) {
this.output = toString(this.escape
? escape(this.output)
: this.output);
JspWriter writer = this.pageContext.getOut();
... | java | @Override
protected void renderTagEnd() {
try {
if (StringUtils.isNotEmpty(this.output)) {
this.output = toString(this.escape
? escape(this.output)
: this.output);
JspWriter writer = this.pageContext.getOut();
... | [
"@",
"Override",
"protected",
"void",
"renderTagEnd",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"StringUtils",
".",
"isNotEmpty",
"(",
"this",
".",
"output",
")",
")",
"{",
"this",
".",
"output",
"=",
"toString",
"(",
"this",
".",
"escape",
"?",
"escape",
... | is rendering the text and a tag around if 'tagName' is set or CSS classes are specified | [
"is",
"rendering",
"the",
"text",
"and",
"a",
"tag",
"around",
"if",
"tagName",
"is",
"set",
"or",
"CSS",
"classes",
"are",
"specified"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/cpnl/TextTag.java#L154-L175 |
108,371 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/cpnl/TextTag.java | TextTag.escape | protected Object escape(Object value) {
EscapeFunction function = ESCAPE_FUNCTION_MAP.get(this.type);
return function != null ? function.escape(TagUtil.getRequest(this.pageContext), value) : CpnlElFunctions.text(toString(value));
} | java | protected Object escape(Object value) {
EscapeFunction function = ESCAPE_FUNCTION_MAP.get(this.type);
return function != null ? function.escape(TagUtil.getRequest(this.pageContext), value) : CpnlElFunctions.text(toString(value));
} | [
"protected",
"Object",
"escape",
"(",
"Object",
"value",
")",
"{",
"EscapeFunction",
"function",
"=",
"ESCAPE_FUNCTION_MAP",
".",
"get",
"(",
"this",
".",
"type",
")",
";",
"return",
"function",
"!=",
"null",
"?",
"function",
".",
"escape",
"(",
"TagUtil",
... | the extension hook for the various types of encoding; must work with Object values to ensure
that non String values can be used as is
@param value the value (String) to encode
@return the encoded String or an appropriate Object | [
"the",
"extension",
"hook",
"for",
"the",
"various",
"types",
"of",
"encoding",
";",
"must",
"work",
"with",
"Object",
"values",
"to",
"ensure",
"that",
"non",
"String",
"values",
"can",
"be",
"used",
"as",
"is"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/cpnl/TextTag.java#L188-L191 |
108,372 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java | JsonUtil.exportJson | public static void exportJson(JsonWriter writer, Resource resource)
throws RepositoryException, IOException {
exportJson(writer, resource, MappingRules.getDefaultMappingRules());
} | java | public static void exportJson(JsonWriter writer, Resource resource)
throws RepositoryException, IOException {
exportJson(writer, resource, MappingRules.getDefaultMappingRules());
} | [
"public",
"static",
"void",
"exportJson",
"(",
"JsonWriter",
"writer",
",",
"Resource",
"resource",
")",
"throws",
"RepositoryException",
",",
"IOException",
"{",
"exportJson",
"(",
"writer",
",",
"resource",
",",
"MappingRules",
".",
"getDefaultMappingRules",
"(",
... | Writes a resources JSON view to a writer using the default application rules for filtering.
@param writer the writer for the JSON transformation
@param resource the resource to transform
@throws RepositoryException
@throws IOException | [
"Writes",
"a",
"resources",
"JSON",
"view",
"to",
"a",
"writer",
"using",
"the",
"default",
"application",
"rules",
"for",
"filtering",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java#L198-L201 |
108,373 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java | JsonUtil.parseJsonProperty | public static JsonProperty parseJsonProperty(JsonReader reader, String name)
throws RepositoryException, IOException {
JsonToken token = reader.peek();
JsonProperty property = new JsonProperty();
property.name = name;
switch (token) {
case BOOLEAN:
... | java | public static JsonProperty parseJsonProperty(JsonReader reader, String name)
throws RepositoryException, IOException {
JsonToken token = reader.peek();
JsonProperty property = new JsonProperty();
property.name = name;
switch (token) {
case BOOLEAN:
... | [
"public",
"static",
"JsonProperty",
"parseJsonProperty",
"(",
"JsonReader",
"reader",
",",
"String",
"name",
")",
"throws",
"RepositoryException",
",",
"IOException",
"{",
"JsonToken",
"token",
"=",
"reader",
".",
"peek",
"(",
")",
";",
"JsonProperty",
"property",... | Parses a single property of the first element of an array and returns the result as a JSON POJO object.
@param reader the reader with the JSON stream
@param name the already parsed name of the property
@return a new JsonProperty object with the name, type, and value set
@throws RepositoryException
@throws IOExceptio... | [
"Parses",
"a",
"single",
"property",
"of",
"the",
"first",
"element",
"of",
"an",
"array",
"and",
"returns",
"the",
"result",
"as",
"a",
"JSON",
"POJO",
"object",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java#L565-L590 |
108,374 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java | JsonUtil.getValueString | public static String getValueString(Object value, int type, MappingRules mapping) {
String string = value.toString();
if (type != PropertyType.STRING &&
mapping.propertyFormat.embedType &&
mapping.propertyFormat.scope == MappingRules.PropertyFormat.Scope.value) {
... | java | public static String getValueString(Object value, int type, MappingRules mapping) {
String string = value.toString();
if (type != PropertyType.STRING &&
mapping.propertyFormat.embedType &&
mapping.propertyFormat.scope == MappingRules.PropertyFormat.Scope.value) {
... | [
"public",
"static",
"String",
"getValueString",
"(",
"Object",
"value",
",",
"int",
"type",
",",
"MappingRules",
"mapping",
")",
"{",
"String",
"string",
"=",
"value",
".",
"toString",
"(",
")",
";",
"if",
"(",
"type",
"!=",
"PropertyType",
".",
"STRING",
... | Embeds the property type in the string value if the formats scope is 'value'.
@param value
@param type
@param mapping
@return | [
"Embeds",
"the",
"property",
"type",
"in",
"the",
"string",
"value",
"if",
"the",
"formats",
"scope",
"is",
"value",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java#L948-L956 |
108,375 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java | JsonUtil.makeJcrValue | public static Value makeJcrValue(Node node, int type, Object object,
MappingRules mapping)
throws PropertyValueFormatException, RepositoryException {
Session session = node.getSession();
ValueFactory factory = session.getValueFactory();
Value val... | java | public static Value makeJcrValue(Node node, int type, Object object,
MappingRules mapping)
throws PropertyValueFormatException, RepositoryException {
Session session = node.getSession();
ValueFactory factory = session.getValueFactory();
Value val... | [
"public",
"static",
"Value",
"makeJcrValue",
"(",
"Node",
"node",
",",
"int",
"type",
",",
"Object",
"object",
",",
"MappingRules",
"mapping",
")",
"throws",
"PropertyValueFormatException",
",",
"RepositoryException",
"{",
"Session",
"session",
"=",
"node",
".",
... | Create a JCR value from string value for the designated JCR type.
@param node the node of the property
@param type the JCR type according to the types declared in PropertyType
@param object the value in the right type or a string representation of the value,
for binary values a input stream can be used as paramete... | [
"Create",
"a",
"JCR",
"value",
"from",
"string",
"value",
"for",
"the",
"designated",
"JCR",
"type",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java#L1128-L1201 |
108,376 | ist-dresden/composum | sling/core/setup/util/src/main/java/com/composum/sling/core/setup/util/SetupUtil.java | SetupUtil.setupGroupsAndUsers | public static void setupGroupsAndUsers(InstallContext ctx,
Map<String, List<String>> groups,
Map<String, List<String>> systemUsers,
Map<String, List<String>> users) throws PackageException {
... | java | public static void setupGroupsAndUsers(InstallContext ctx,
Map<String, List<String>> groups,
Map<String, List<String>> systemUsers,
Map<String, List<String>> users) throws PackageException {
... | [
"public",
"static",
"void",
"setupGroupsAndUsers",
"(",
"InstallContext",
"ctx",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"groups",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"systemUsers",
",",
"Map",
"<",
... | Creates or updates a set of groups, users and system users
@param ctx the installation context
@param groups map of group names (including path, e.g. composum/plaform/composum-platform-users) to list of
users (have to exist already)
@param systemUsers map of system user names (including path, e.g. system/... | [
"Creates",
"or",
"updates",
"a",
"set",
"of",
"groups",
"users",
"and",
"system",
"users"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/setup/util/src/main/java/com/composum/sling/core/setup/util/SetupUtil.java#L37-L82 |
108,377 | ist-dresden/composum | sling/core/setup/util/src/main/java/com/composum/sling/core/setup/util/SetupUtil.java | SetupUtil.getService | @SuppressWarnings("unchecked")
public static <T> T getService(Class<T> type) {
Bundle serviceBundle = FrameworkUtil.getBundle(type);
BundleContext serviceBundleContext = serviceBundle.getBundleContext();
ServiceReference serviceReference = serviceBundleContext.getServiceReference(type.getNam... | java | @SuppressWarnings("unchecked")
public static <T> T getService(Class<T> type) {
Bundle serviceBundle = FrameworkUtil.getBundle(type);
BundleContext serviceBundleContext = serviceBundle.getBundleContext();
ServiceReference serviceReference = serviceBundleContext.getServiceReference(type.getNam... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"getService",
"(",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"Bundle",
"serviceBundle",
"=",
"FrameworkUtil",
".",
"getBundle",
"(",
"type",
")",
";",
"BundleContex... | retrieve a service during setup | [
"retrieve",
"a",
"service",
"during",
"setup"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/setup/util/src/main/java/com/composum/sling/core/setup/util/SetupUtil.java#L132-L138 |
108,378 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/clientlibs/processor/ProcessingVisitor.java | ProcessingVisitor.alreadyProcessed | @Override
protected void alreadyProcessed(ClientlibRef ref, VisitorMode mode, ClientlibResourceFolder folder) {
if (mode == EMBEDDED) {
LOG.warn("Trying to embed already embedded / dependency {} again at {}", ref, folder);
}
} | java | @Override
protected void alreadyProcessed(ClientlibRef ref, VisitorMode mode, ClientlibResourceFolder folder) {
if (mode == EMBEDDED) {
LOG.warn("Trying to embed already embedded / dependency {} again at {}", ref, folder);
}
} | [
"@",
"Override",
"protected",
"void",
"alreadyProcessed",
"(",
"ClientlibRef",
"ref",
",",
"VisitorMode",
"mode",
",",
"ClientlibResourceFolder",
"folder",
")",
"{",
"if",
"(",
"mode",
"==",
"EMBEDDED",
")",
"{",
"LOG",
".",
"warn",
"(",
"\"Trying to embed alrea... | Warns about everything that should be embedded, but is already processed, and not in this | [
"Warns",
"about",
"everything",
"that",
"should",
"be",
"embedded",
"but",
"is",
"already",
"processed",
"and",
"not",
"in",
"this"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/processor/ProcessingVisitor.java#L87-L92 |
108,379 | ist-dresden/composum | sling/core/usermgnt/src/main/java/com/composum/sling/core/usermanagement/core/UserMgmtServiceImpl.java | UserMgmtServiceImpl.getOrCreateUser | public Authorizable getOrCreateUser(JackrabbitSession session, UserManager userManager,
String path, boolean systemUser)
throws RepositoryException {
String[] pathAndName = pathAndName(path);
Authorizable user = userManager.getAuthorizable(pathAndName[... | java | public Authorizable getOrCreateUser(JackrabbitSession session, UserManager userManager,
String path, boolean systemUser)
throws RepositoryException {
String[] pathAndName = pathAndName(path);
Authorizable user = userManager.getAuthorizable(pathAndName[... | [
"public",
"Authorizable",
"getOrCreateUser",
"(",
"JackrabbitSession",
"session",
",",
"UserManager",
"userManager",
",",
"String",
"path",
",",
"boolean",
"systemUser",
")",
"throws",
"RepositoryException",
"{",
"String",
"[",
"]",
"pathAndName",
"=",
"pathAndName",
... | Retrieves a user by its name; if the user doesn't exist the user will be created.
@param path the name of the user with an optional prepended intermediate path for user creation | [
"Retrieves",
"a",
"user",
"by",
"its",
"name",
";",
"if",
"the",
"user",
"doesn",
"t",
"exist",
"the",
"user",
"will",
"be",
"created",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/usermgnt/src/main/java/com/composum/sling/core/usermanagement/core/UserMgmtServiceImpl.java#L29-L52 |
108,380 | ist-dresden/composum | sling/core/usermgnt/src/main/java/com/composum/sling/core/usermanagement/core/UserMgmtServiceImpl.java | UserMgmtServiceImpl.getOrCreateGroup | public Group getOrCreateGroup(JackrabbitSession session, UserManager userManager,
String path)
throws RepositoryException {
String[] pathAndName = pathAndName(path);
Group group = (Group) userManager.getAuthorizable(pathAndName[1]);
LOG.debug("group.... | java | public Group getOrCreateGroup(JackrabbitSession session, UserManager userManager,
String path)
throws RepositoryException {
String[] pathAndName = pathAndName(path);
Group group = (Group) userManager.getAuthorizable(pathAndName[1]);
LOG.debug("group.... | [
"public",
"Group",
"getOrCreateGroup",
"(",
"JackrabbitSession",
"session",
",",
"UserManager",
"userManager",
",",
"String",
"path",
")",
"throws",
"RepositoryException",
"{",
"String",
"[",
"]",
"pathAndName",
"=",
"pathAndName",
"(",
"path",
")",
";",
"Group",
... | Retrieves a group by their name; if the group doesn't exist the group will be created.
@param path the name of the group with an optional prepended intermediate path for group creation | [
"Retrieves",
"a",
"group",
"by",
"their",
"name",
";",
"if",
"the",
"group",
"doesn",
"t",
"exist",
"the",
"group",
"will",
"be",
"created",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/usermgnt/src/main/java/com/composum/sling/core/usermanagement/core/UserMgmtServiceImpl.java#L59-L70 |
108,381 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibRef.java | ClientlibRef.isSatisfiedby | public boolean isSatisfiedby(ClientlibLink link) {
if (!type.equals(link.type)) return false;
if (isCategory()) {
if (!link.isCategory() || !category.equals(link.path)) return false;
} else if (isExternalUri()) {
if (!link.isExternalUri() || !externalUri.equals(link.path)... | java | public boolean isSatisfiedby(ClientlibLink link) {
if (!type.equals(link.type)) return false;
if (isCategory()) {
if (!link.isCategory() || !category.equals(link.path)) return false;
} else if (isExternalUri()) {
if (!link.isExternalUri() || !externalUri.equals(link.path)... | [
"public",
"boolean",
"isSatisfiedby",
"(",
"ClientlibLink",
"link",
")",
"{",
"if",
"(",
"!",
"type",
".",
"equals",
"(",
"link",
".",
"type",
")",
")",
"return",
"false",
";",
"if",
"(",
"isCategory",
"(",
")",
")",
"{",
"if",
"(",
"!",
"link",
".... | Checks whether the link matches this, up to version patterns. | [
"Checks",
"whether",
"the",
"link",
"matches",
"this",
"up",
"to",
"version",
"patterns",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibRef.java#L66-L78 |
108,382 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibRef.java | ClientlibRef.isSatisfiedby | public boolean isSatisfiedby(Collection<ClientlibLink> links) {
for (ClientlibLink link : links) if (isSatisfiedby(link)) return true;
return false;
} | java | public boolean isSatisfiedby(Collection<ClientlibLink> links) {
for (ClientlibLink link : links) if (isSatisfiedby(link)) return true;
return false;
} | [
"public",
"boolean",
"isSatisfiedby",
"(",
"Collection",
"<",
"ClientlibLink",
">",
"links",
")",
"{",
"for",
"(",
"ClientlibLink",
"link",
":",
"links",
")",
"if",
"(",
"isSatisfiedby",
"(",
"link",
")",
")",
"return",
"true",
";",
"return",
"false",
";",... | Checks whether one of the links matches this, up to version patterns. | [
"Checks",
"whether",
"one",
"of",
"the",
"links",
"matches",
"this",
"up",
"to",
"version",
"patterns",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibRef.java#L81-L84 |
108,383 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java | LinkUtil.getAbsoluteUrl | public static String getAbsoluteUrl(SlingHttpServletRequest request, String url) {
if (!isExternalUrl(url) && url.startsWith("/")) {
String scheme = request.getScheme().toLowerCase();
url = scheme + "://" + getAuthority(request) + url;
}
return url;
} | java | public static String getAbsoluteUrl(SlingHttpServletRequest request, String url) {
if (!isExternalUrl(url) && url.startsWith("/")) {
String scheme = request.getScheme().toLowerCase();
url = scheme + "://" + getAuthority(request) + url;
}
return url;
} | [
"public",
"static",
"String",
"getAbsoluteUrl",
"(",
"SlingHttpServletRequest",
"request",
",",
"String",
"url",
")",
"{",
"if",
"(",
"!",
"isExternalUrl",
"(",
"url",
")",
"&&",
"url",
".",
"startsWith",
"(",
"\"/\"",
")",
")",
"{",
"String",
"scheme",
"=... | Makes a URL already built external; the url should be built by the 'getUrl' method.
@param request the request as the externalization context
@param url the url value (the local URL)
@return | [
"Makes",
"a",
"URL",
"already",
"built",
"external",
";",
"the",
"url",
"should",
"be",
"built",
"by",
"the",
"getUrl",
"method",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java#L182-L188 |
108,384 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java | LinkUtil.resolveUrl | public static Resource resolveUrl(SlingHttpServletRequest request, String url) {
return request.getResourceResolver().getResource(url);
} | java | public static Resource resolveUrl(SlingHttpServletRequest request, String url) {
return request.getResourceResolver().getResource(url);
} | [
"public",
"static",
"Resource",
"resolveUrl",
"(",
"SlingHttpServletRequest",
"request",
",",
"String",
"url",
")",
"{",
"return",
"request",
".",
"getResourceResolver",
"(",
")",
".",
"getResource",
"(",
"url",
")",
";",
"}"
] | Returns the resource referenced by an URL. | [
"Returns",
"the",
"resource",
"referenced",
"by",
"an",
"URL",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java#L247-L249 |
108,385 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java | LinkUtil.getFinalTarget | public static String getFinalTarget(Resource resource) throws RedirectLoopException {
ResourceHandle handle = ResourceHandle.use(resource);
String finalTarget = getFinalTarget(handle, new ArrayList<String>());
return finalTarget;
} | java | public static String getFinalTarget(Resource resource) throws RedirectLoopException {
ResourceHandle handle = ResourceHandle.use(resource);
String finalTarget = getFinalTarget(handle, new ArrayList<String>());
return finalTarget;
} | [
"public",
"static",
"String",
"getFinalTarget",
"(",
"Resource",
"resource",
")",
"throws",
"RedirectLoopException",
"{",
"ResourceHandle",
"handle",
"=",
"ResourceHandle",
".",
"use",
"(",
"resource",
")",
";",
"String",
"finalTarget",
"=",
"getFinalTarget",
"(",
... | Retrieves the target for a resource if there are redirects declared.
@return the target path or url (can be external); 'null' if no redirect detected
@throws RedirectLoopException if a 'loop' has been detected during redirect resolving | [
"Retrieves",
"the",
"target",
"for",
"a",
"resource",
"if",
"there",
"are",
"redirects",
"declared",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java#L257-L261 |
108,386 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java | LinkUtil.getFinalTarget | protected static String getFinalTarget(ResourceHandle resource, List<String> trace)
throws RedirectLoopException {
String finalTarget = null;
if (resource.isValid()) {
String path = resource.getPath();
if (trace.contains(path)) {
// throw an exception ... | java | protected static String getFinalTarget(ResourceHandle resource, List<String> trace)
throws RedirectLoopException {
String finalTarget = null;
if (resource.isValid()) {
String path = resource.getPath();
if (trace.contains(path)) {
// throw an exception ... | [
"protected",
"static",
"String",
"getFinalTarget",
"(",
"ResourceHandle",
"resource",
",",
"List",
"<",
"String",
">",
"trace",
")",
"throws",
"RedirectLoopException",
"{",
"String",
"finalTarget",
"=",
"null",
";",
"if",
"(",
"resource",
".",
"isValid",
"(",
... | Determines the 'final URL' of a link to a resource by traversing along the 'redirect' properties.
@param resource the addressed resource
@param trace the list of paths traversed before (to detect loops in redirects)
@return a 'final' path or URL; <code>null</code> if no different target found
@throws RedirectLoopEx... | [
"Determines",
"the",
"final",
"URL",
"of",
"a",
"link",
"to",
"a",
"resource",
"by",
"traversing",
"along",
"the",
"redirect",
"properties",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java#L271-L312 |
108,387 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/servlet/AbstractConsoleServlet.java | AbstractConsoleServlet.checkConsoleAccess | protected boolean checkConsoleAccess(BeanContext context) {
String consolePath = getConsolePath(context);
if (StringUtils.isNotBlank(consolePath)) {
return context.getResolver().getResource(consolePath) != null;
}
return true;
} | java | protected boolean checkConsoleAccess(BeanContext context) {
String consolePath = getConsolePath(context);
if (StringUtils.isNotBlank(consolePath)) {
return context.getResolver().getResource(consolePath) != null;
}
return true;
} | [
"protected",
"boolean",
"checkConsoleAccess",
"(",
"BeanContext",
"context",
")",
"{",
"String",
"consolePath",
"=",
"getConsolePath",
"(",
"context",
")",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"consolePath",
")",
")",
"{",
"return",
"context",
... | Check access rights to the servlets path - is checking ACLs of the console path
@param context the current request
@return 'true' if access granted or access check switched off | [
"Check",
"access",
"rights",
"to",
"the",
"servlets",
"path",
"-",
"is",
"checking",
"ACLs",
"of",
"the",
"console",
"path"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/servlet/AbstractConsoleServlet.java#L113-L119 |
108,388 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/Clientlib.java | Clientlib.makeLink | @Override
public ClientlibLink makeLink() {
return new ClientlibLink(getType(), ClientlibLink.Kind.CLIENTLIB, resource.getPath(), null);
} | java | @Override
public ClientlibLink makeLink() {
return new ClientlibLink(getType(), ClientlibLink.Kind.CLIENTLIB, resource.getPath(), null);
} | [
"@",
"Override",
"public",
"ClientlibLink",
"makeLink",
"(",
")",
"{",
"return",
"new",
"ClientlibLink",
"(",
"getType",
"(",
")",
",",
"ClientlibLink",
".",
"Kind",
".",
"CLIENTLIB",
",",
"resource",
".",
"getPath",
"(",
")",
",",
"null",
")",
";",
"}"
... | A link that matches this. | [
"A",
"link",
"that",
"matches",
"this",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/Clientlib.java#L50-L53 |
108,389 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java | CpnlElFunctions.child | public static String child(Resource base, String path) {
Resource child = base.getChild(path);
return child != null ? child.getPath() : path;
} | java | public static String child(Resource base, String path) {
Resource child = base.getChild(path);
return child != null ? child.getPath() : path;
} | [
"public",
"static",
"String",
"child",
"(",
"Resource",
"base",
",",
"String",
"path",
")",
"{",
"Resource",
"child",
"=",
"base",
".",
"getChild",
"(",
"path",
")",
";",
"return",
"child",
"!=",
"null",
"?",
"child",
".",
"getPath",
"(",
")",
":",
"... | Returns the repository path of a child of a resource.
@param base the parent resource object
@param path the relative path to the child resource
@return the absolute path of the child if found, otherwise the original path value | [
"Returns",
"the",
"repository",
"path",
"of",
"a",
"child",
"of",
"a",
"resource",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java#L164-L167 |
108,390 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java | CpnlElFunctions.map | public static String map(SlingHttpServletRequest request, String value) {
StringBuilder result = new StringBuilder();
Matcher matcher = HREF_PATTERN.matcher(value);
int len = value.length();
int pos = 0;
while (matcher.find(pos)) {
String unmapped = matcher.group(3);
... | java | public static String map(SlingHttpServletRequest request, String value) {
StringBuilder result = new StringBuilder();
Matcher matcher = HREF_PATTERN.matcher(value);
int len = value.length();
int pos = 0;
while (matcher.find(pos)) {
String unmapped = matcher.group(3);
... | [
"public",
"static",
"String",
"map",
"(",
"SlingHttpServletRequest",
"request",
",",
"String",
"value",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Matcher",
"matcher",
"=",
"HREF_PATTERN",
".",
"matcher",
"(",
"value",
")... | Replaces all 'href' attribute values found in the text value by the resolver mapped value.
@param request the text (rich text) value
@param value the text (rich text) value
@return the transformed text value | [
"Replaces",
"all",
"href",
"attribute",
"values",
"found",
"in",
"the",
"text",
"value",
"by",
"the",
"resolver",
"mapped",
"value",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java#L300-L318 |
108,391 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java | CpnlElFunctions.path | public static String path(String value) {
return value != null ? LinkUtil.encodePath(value) : null;
} | java | public static String path(String value) {
return value != null ? LinkUtil.encodePath(value) : null;
} | [
"public",
"static",
"String",
"path",
"(",
"String",
"value",
")",
"{",
"return",
"value",
"!=",
"null",
"?",
"LinkUtil",
".",
"encodePath",
"(",
"value",
")",
":",
"null",
";",
"}"
] | Returns the encoded path of a of a repository path.
@param value the path to encode
@return the encoded path | [
"Returns",
"the",
"encoded",
"path",
"of",
"a",
"of",
"a",
"repository",
"path",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java#L326-L328 |
108,392 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java | CpnlElFunctions.getFormatter | public static Format getFormatter(@Nonnull final Locale locale, @Nonnull final String format,
@Nullable final Class<?>... type) {
Format formatter = null;
Pattern TEXT_FORMAT_STRING = Pattern.compile("^\\{([^}]+)}(.+)$");
Matcher matcher = TEXT_FORMAT_STRING... | java | public static Format getFormatter(@Nonnull final Locale locale, @Nonnull final String format,
@Nullable final Class<?>... type) {
Format formatter = null;
Pattern TEXT_FORMAT_STRING = Pattern.compile("^\\{([^}]+)}(.+)$");
Matcher matcher = TEXT_FORMAT_STRING... | [
"public",
"static",
"Format",
"getFormatter",
"(",
"@",
"Nonnull",
"final",
"Locale",
"locale",
",",
"@",
"Nonnull",
"final",
"String",
"format",
",",
"@",
"Nullable",
"final",
"Class",
"<",
"?",
">",
"...",
"type",
")",
"{",
"Format",
"formatter",
"=",
... | Creates the formatter for a describing string rule
@param locale the local to use for formatting
@param format the format string rule
@param type the optional value type
@return the Format instance | [
"Creates",
"the",
"formatter",
"for",
"a",
"describing",
"string",
"rule"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java#L358-L388 |
108,393 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java | ResourceHandle.use | public static ResourceHandle use(Resource resource) {
return resource instanceof ResourceHandle
? ((ResourceHandle) resource) : new ResourceHandle(resource);
} | java | public static ResourceHandle use(Resource resource) {
return resource instanceof ResourceHandle
? ((ResourceHandle) resource) : new ResourceHandle(resource);
} | [
"public",
"static",
"ResourceHandle",
"use",
"(",
"Resource",
"resource",
")",
"{",
"return",
"resource",
"instanceof",
"ResourceHandle",
"?",
"(",
"(",
"ResourceHandle",
")",
"resource",
")",
":",
"new",
"ResourceHandle",
"(",
"resource",
")",
";",
"}"
] | The 'adaptTo' like wrapping helper.
@return the wrapped resource (may be resource itself if it is a ResourceHandle), not null | [
"The",
"adaptTo",
"like",
"wrapping",
"helper",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java#L41-L44 |
108,394 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java | ResourceHandle.isValid | public static boolean isValid(Resource resource) {
return resource instanceof ResourceHandle
? ((ResourceHandle) resource).isValid()
: resource != null && resource.getResourceResolver().getResource(resource.getPath()) != null;
} | java | public static boolean isValid(Resource resource) {
return resource instanceof ResourceHandle
? ((ResourceHandle) resource).isValid()
: resource != null && resource.getResourceResolver().getResource(resource.getPath()) != null;
} | [
"public",
"static",
"boolean",
"isValid",
"(",
"Resource",
"resource",
")",
"{",
"return",
"resource",
"instanceof",
"ResourceHandle",
"?",
"(",
"(",
"ResourceHandle",
")",
"resource",
")",
".",
"isValid",
"(",
")",
":",
"resource",
"!=",
"null",
"&&",
"reso... | the universal validation test | [
"the",
"universal",
"validation",
"test"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java#L47-L51 |
108,395 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java | ResourceHandle.isValid | public boolean isValid() {
if (valid == null) {
valid = (this.resource != null);
if (valid) {
valid = (getResourceResolver().getResource(getPath()) != null);
}
}
return valid;
} | java | public boolean isValid() {
if (valid == null) {
valid = (this.resource != null);
if (valid) {
valid = (getResourceResolver().getResource(getPath()) != null);
}
}
return valid;
} | [
"public",
"boolean",
"isValid",
"(",
")",
"{",
"if",
"(",
"valid",
"==",
"null",
")",
"{",
"valid",
"=",
"(",
"this",
".",
"resource",
"!=",
"null",
")",
";",
"if",
"(",
"valid",
")",
"{",
"valid",
"=",
"(",
"getResourceResolver",
"(",
")",
".",
... | a resource is valid if not 'null' and resolvable | [
"a",
"resource",
"is",
"valid",
"if",
"not",
"null",
"and",
"resolvable"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java#L100-L108 |
108,396 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java | ResourceHandle.getId | public String getId() {
if (id == null) {
if (isValid()) {
id = getProperty(ResourceUtil.PROP_UUID);
}
if (StringUtils.isBlank(id)) {
id = Base64.encodeBase64String(getPath().getBytes(MappingRules.CHARSET));
}
}
retu... | java | public String getId() {
if (id == null) {
if (isValid()) {
id = getProperty(ResourceUtil.PROP_UUID);
}
if (StringUtils.isBlank(id)) {
id = Base64.encodeBase64String(getPath().getBytes(MappingRules.CHARSET));
}
}
retu... | [
"public",
"String",
"getId",
"(",
")",
"{",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"if",
"(",
"isValid",
"(",
")",
")",
"{",
"id",
"=",
"getProperty",
"(",
"ResourceUtil",
".",
"PROP_UUID",
")",
";",
"}",
"if",
"(",
"StringUtils",
".",
"isBlank",... | Lazy getter for the ID of the resources. The ID is the UUID of the resources node if available otherwise the
Base64 encoded path.
@return a hopefully useful ID (not <code>null</code>) | [
"Lazy",
"getter",
"for",
"the",
"ID",
"of",
"the",
"resources",
".",
"The",
"ID",
"is",
"the",
"UUID",
"of",
"the",
"resources",
"node",
"if",
"available",
"otherwise",
"the",
"Base64",
"encoded",
"path",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java#L322-L332 |
108,397 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java | ResourceHandle.getChildrenByType | public List<ResourceHandle> getChildrenByType(final String type) {
final ArrayList<ResourceHandle> children = new ArrayList<>();
if (this.isValid()) {
for (final Resource child : this.resource.getChildren()) {
ResourceHandle handle = ResourceHandle.use(child);
... | java | public List<ResourceHandle> getChildrenByType(final String type) {
final ArrayList<ResourceHandle> children = new ArrayList<>();
if (this.isValid()) {
for (final Resource child : this.resource.getChildren()) {
ResourceHandle handle = ResourceHandle.use(child);
... | [
"public",
"List",
"<",
"ResourceHandle",
">",
"getChildrenByType",
"(",
"final",
"String",
"type",
")",
"{",
"final",
"ArrayList",
"<",
"ResourceHandle",
">",
"children",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"this",
".",
"isValid",
"(",... | retrieves all children of a type | [
"retrieves",
"all",
"children",
"of",
"a",
"type"
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/ResourceHandle.java#L470-L481 |
108,398 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/NodeUtil.java | NodeUtil.getId | public String getId(Node node) {
String id = null;
try {
id = node.getIdentifier();
} catch (RepositoryException e) {
id = node.toString(); // use Java 'ID'
}
return id;
} | java | public String getId(Node node) {
String id = null;
try {
id = node.getIdentifier();
} catch (RepositoryException e) {
id = node.toString(); // use Java 'ID'
}
return id;
} | [
"public",
"String",
"getId",
"(",
"Node",
"node",
")",
"{",
"String",
"id",
"=",
"null",
";",
"try",
"{",
"id",
"=",
"node",
".",
"getIdentifier",
"(",
")",
";",
"}",
"catch",
"(",
"RepositoryException",
"e",
")",
"{",
"id",
"=",
"node",
".",
"toSt... | Retrieves the nodes id.
@return a hopefully useful ID (not <code>null</code>) | [
"Retrieves",
"the",
"nodes",
"id",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/NodeUtil.java#L28-L36 |
108,399 | ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/core/util/NodeUtil.java | NodeUtil.getTitle | public static String getTitle(Node node) {
String title = getNodeTitle(node);
if (StringUtils.isBlank(title)) {
try {
title = node.getName();
} catch (RepositoryException rex) {
LOG.error(rex.getMessage(), rex);
}
}
retu... | java | public static String getTitle(Node node) {
String title = getNodeTitle(node);
if (StringUtils.isBlank(title)) {
try {
title = node.getName();
} catch (RepositoryException rex) {
LOG.error(rex.getMessage(), rex);
}
}
retu... | [
"public",
"static",
"String",
"getTitle",
"(",
"Node",
"node",
")",
"{",
"String",
"title",
"=",
"getNodeTitle",
"(",
"node",
")",
";",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"title",
")",
")",
"{",
"try",
"{",
"title",
"=",
"node",
".",
"get... | Retrieves the title with a fallback to the nodes name.
@param node
@return the usable title (not blank) | [
"Retrieves",
"the",
"title",
"with",
"a",
"fallback",
"to",
"the",
"nodes",
"name",
"."
] | ebc79f559f6022c935240c19102539bdfb1bd1e2 | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/NodeUtil.java#L44-L54 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.