repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/AppPackageUrl.java | AppPackageUrl.getApplicationSummaryChildrenUrl | public static MozuUrl getApplicationSummaryChildrenUrl(String appId)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/appdev/apppackages/apps/{appId}/");
formatter.formatUrl("appId", appId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getApplicationSummaryChildrenUrl(String appId)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/appdev/apppackages/apps/{appId}/");
formatter.formatUrl("appId", appId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getApplicationSummaryChildrenUrl",
"(",
"String",
"appId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/appdev/apppackages/apps/{appId}/\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"appId\... | Get Resource Url for GetApplicationSummaryChildren
@param appId appId parameter description DOCUMENT_HERE
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetApplicationSummaryChildren"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/AppPackageUrl.java#L81-L86 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/AppPackageUrl.java | AppPackageUrl.clonePackageUrl | public static MozuUrl clonePackageUrl(String applicationKey, String packageName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/appdev/apppackages/{applicationKey}/clone/{packageName}?responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("packageName", packageName);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl clonePackageUrl(String applicationKey, String packageName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/appdev/apppackages/{applicationKey}/clone/{packageName}?responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("packageName", packageName);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"clonePackageUrl",
"(",
"String",
"applicationKey",
",",
"String",
"packageName",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/appdev/apppackages/{applicationKey}/clo... | Get Resource Url for ClonePackage
@param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}.
@param packageName
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"ClonePackage"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/appdev/AppPackageUrl.java#L115-L122 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java | ApplicationUrl.getAppVersionsUrl | public static MozuUrl getAppVersionsUrl(String nsAndAppId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/applications/versions/{nsAndAppId}?responseFields={responseFields}");
formatter.formatUrl("nsAndAppId", nsAndAppId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | java | public static MozuUrl getAppVersionsUrl(String nsAndAppId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/applications/versions/{nsAndAppId}?responseFields={responseFields}");
formatter.formatUrl("nsAndAppId", nsAndAppId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getAppVersionsUrl",
"(",
"String",
"nsAndAppId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/developer/applications/versions/{nsAndAppId}?responseFields={responseFields}\... | Get Resource Url for GetAppVersions
@param nsAndAppId The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetAppVersions"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java#L36-L42 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java | ApplicationUrl.getPackageFileMetadataUrl | public static MozuUrl getPackageFileMetadataUrl(String applicationKey, String filepath, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/packages/{applicationKey}/filemetadata/{filepath}?responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("filepath", filepath);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | java | public static MozuUrl getPackageFileMetadataUrl(String applicationKey, String filepath, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/packages/{applicationKey}/filemetadata/{filepath}?responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("filepath", filepath);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getPackageFileMetadataUrl",
"(",
"String",
"applicationKey",
",",
"String",
"filepath",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/developer/packages/{applicationK... | Get Resource Url for GetPackageFileMetadata
@param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}.
@param filepath Represents the file name and location.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetPackageFileMetadata"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java#L51-L58 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java | ApplicationUrl.upsertPackageFileUrl | public static MozuUrl upsertPackageFileUrl(String applicationKey, String filepath, String lastModifiedTime, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/packages/{applicationKey}/files/{filepath}?lastModifiedTime={lastModifiedTime}&responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("filepath", filepath);
formatter.formatUrl("lastModifiedTime", lastModifiedTime);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | java | public static MozuUrl upsertPackageFileUrl(String applicationKey, String filepath, String lastModifiedTime, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/packages/{applicationKey}/files/{filepath}?lastModifiedTime={lastModifiedTime}&responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("filepath", filepath);
formatter.formatUrl("lastModifiedTime", lastModifiedTime);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | [
"public",
"static",
"MozuUrl",
"upsertPackageFileUrl",
"(",
"String",
"applicationKey",
",",
"String",
"filepath",
",",
"String",
"lastModifiedTime",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platf... | Get Resource Url for UpsertPackageFile
@param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}.
@param filepath The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}.
@param lastModifiedTime The date and time of the last file insert or update. This parameter is optional.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpsertPackageFile"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java#L82-L90 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java | ApplicationUrl.renamePackageFileUrl | public static MozuUrl renamePackageFileUrl(String applicationKey, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/packages/{applicationKey}/files_rename?responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | java | public static MozuUrl renamePackageFileUrl(String applicationKey, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/packages/{applicationKey}/files_rename?responseFields={responseFields}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | [
"public",
"static",
"MozuUrl",
"renamePackageFileUrl",
"(",
"String",
"applicationKey",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/developer/packages/{applicationKey}/files_rename?responseFields={respo... | Get Resource Url for RenamePackageFile
@param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RenamePackageFile"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java#L98-L104 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java | ApplicationUrl.deletePackageFileUrl | public static MozuUrl deletePackageFileUrl(String applicationKey, String filepath)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/packages/{applicationKey}/files/{filepath}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("filepath", filepath);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | java | public static MozuUrl deletePackageFileUrl(String applicationKey, String filepath)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/developer/packages/{applicationKey}/files/{filepath}");
formatter.formatUrl("applicationKey", applicationKey);
formatter.formatUrl("filepath", filepath);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deletePackageFileUrl",
"(",
"String",
"applicationKey",
",",
"String",
"filepath",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/developer/packages/{applicationKey}/files/{filepath}\"",
")",
";",
"fo... | Get Resource Url for DeletePackageFile
@param applicationKey The application key uniquely identifies the developer namespace, application ID, version, and package in Dev Center. The format is {Dev Account namespace}.{Application ID}.{Application Version}.{Package name}.
@param filepath Represents the file name and location.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeletePackageFile"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/ApplicationUrl.java#L112-L118 | train |
nmdp-bioinformatics/ngs | reads/src/main/java/org/nmdp/ngs/reads/quality/ScoreFunctions.java | ScoreFunctions.illumina | public static ScoreFunction illumina() {
return new ScoreFunction() {
@Override
public double evaluate(final double relativePosition) {
// TODO: this could use improvement; perhaps re-use quality profiles from ART
if (relativePosition < 0.05d) {
return 14400.0d * (relativePosition * relativePosition);
}
else if (relativePosition < 0.8d) {
return 36.0d;
}
else {
return 22600.0d * Math.pow(relativePosition - 1.0d, 4.0d);
}
}
};
} | java | public static ScoreFunction illumina() {
return new ScoreFunction() {
@Override
public double evaluate(final double relativePosition) {
// TODO: this could use improvement; perhaps re-use quality profiles from ART
if (relativePosition < 0.05d) {
return 14400.0d * (relativePosition * relativePosition);
}
else if (relativePosition < 0.8d) {
return 36.0d;
}
else {
return 22600.0d * Math.pow(relativePosition - 1.0d, 4.0d);
}
}
};
} | [
"public",
"static",
"ScoreFunction",
"illumina",
"(",
")",
"{",
"return",
"new",
"ScoreFunction",
"(",
")",
"{",
"@",
"Override",
"public",
"double",
"evaluate",
"(",
"final",
"double",
"relativePosition",
")",
"{",
"// TODO: this could use improvement; perhaps re-use... | Illumina positional score function.
@return the Illumina positional score function | [
"Illumina",
"positional",
"score",
"function",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/reads/src/main/java/org/nmdp/ngs/reads/quality/ScoreFunctions.java#L43-L59 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java | FacetUrl.getFacetUrl | public static MozuUrl getFacetUrl(Integer facetId, String responseFields, Boolean validate)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/{facetId}?validate={validate}&responseFields={responseFields}");
formatter.formatUrl("facetId", facetId);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("validate", validate);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getFacetUrl(Integer facetId, String responseFields, Boolean validate)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/{facetId}?validate={validate}&responseFields={responseFields}");
formatter.formatUrl("facetId", facetId);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("validate", validate);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getFacetUrl",
"(",
"Integer",
"facetId",
",",
"String",
"responseFields",
",",
"Boolean",
"validate",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/facets/{facetId}?validate={validate}&... | Get Resource Url for GetFacet
@param facetId Unique identifier of the facet to retrieve.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param validate Validates that the product category associated with a facet is active. System-supplied and read only.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetFacet"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java#L23-L30 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java | FacetUrl.getFacetCategoryListUrl | public static MozuUrl getFacetCategoryListUrl(Integer categoryId, Boolean includeAvailable, String responseFields, Boolean validate)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/category/{categoryId}?includeAvailable={includeAvailable}&validate={validate}&responseFields={responseFields}");
formatter.formatUrl("categoryId", categoryId);
formatter.formatUrl("includeAvailable", includeAvailable);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("validate", validate);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getFacetCategoryListUrl(Integer categoryId, Boolean includeAvailable, String responseFields, Boolean validate)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/category/{categoryId}?includeAvailable={includeAvailable}&validate={validate}&responseFields={responseFields}");
formatter.formatUrl("categoryId", categoryId);
formatter.formatUrl("includeAvailable", includeAvailable);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("validate", validate);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getFacetCategoryListUrl",
"(",
"Integer",
"categoryId",
",",
"Boolean",
"includeAvailable",
",",
"String",
"responseFields",
",",
"Boolean",
"validate",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/com... | Get Resource Url for GetFacetCategoryList
@param categoryId Unique identifier of the category to modify.
@param includeAvailable If true, returns a list of the attributes and categories associated with a product type that have not been defined as a facet for the category.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param validate Validates that the product category associated with a facet is active. System-supplied and read only.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetFacetCategoryList"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java#L40-L48 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java | FacetUrl.updateFacetUrl | public static MozuUrl updateFacetUrl(Integer facetId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/{facetId}?responseFields={responseFields}");
formatter.formatUrl("facetId", facetId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateFacetUrl(Integer facetId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/{facetId}?responseFields={responseFields}");
formatter.formatUrl("facetId", facetId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateFacetUrl",
"(",
"Integer",
"facetId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/facets/{facetId}?responseFields={responseFields}\"",
")",
";",
... | Get Resource Url for UpdateFacet
@param facetId Unique identifier of the facet to retrieve.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateFacet"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java#L68-L74 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java | FacetUrl.deleteFacetByIdUrl | public static MozuUrl deleteFacetByIdUrl(Integer facetId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/{facetId}");
formatter.formatUrl("facetId", facetId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteFacetByIdUrl(Integer facetId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/{facetId}");
formatter.formatUrl("facetId", facetId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteFacetByIdUrl",
"(",
"Integer",
"facetId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/facets/{facetId}\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"facetId\"",
",",
... | Get Resource Url for DeleteFacetById
@param facetId Unique identifier of the facet to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteFacetById"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java#L81-L86 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.intersect | @Override
public Interval<C> intersect(final Interval<C> that) {
if(this == MAGIC || that == NULL) {
return that;
}
if(this == NULL) {
return NULL;
}
if(that == MAGIC) {
return new Interval(this.dimension, this.range);
}
if(this.dimension == that.dimension) {
if(this.isConnected(that)) {
return new Interval(this.dimension,
this.range.intersection(that.range));
}
return new Interval(this.dimension);
}
return NULL;
} | java | @Override
public Interval<C> intersect(final Interval<C> that) {
if(this == MAGIC || that == NULL) {
return that;
}
if(this == NULL) {
return NULL;
}
if(that == MAGIC) {
return new Interval(this.dimension, this.range);
}
if(this.dimension == that.dimension) {
if(this.isConnected(that)) {
return new Interval(this.dimension,
this.range.intersection(that.range));
}
return new Interval(this.dimension);
}
return NULL;
} | [
"@",
"Override",
"public",
"Interval",
"<",
"C",
">",
"intersect",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"if",
"(",
"this",
"==",
"MAGIC",
"||",
"that",
"==",
"NULL",
")",
"{",
"return",
"that",
";",
"}",
"if",
"(",
"this",
"... | Find the intersection of two intervals.
@param that interval
@return intersection of this and that, which is {@link #NULL} if the two
intervals do not overlap
@see Range#intersection(com.google.common.collect.Range)
@see Range#isConnected(com.google.common.collect.Range)
@see Interval#overlaps(org.nmdp.ngs.fca.Interval)
@see <a href="https://en.wikipedia.org/wiki/Commutative_property">
commutative property</a>
@see <a href="https://en.wikipedia.org/wiki/Idempotence"> idempotence</a> | [
"Find",
"the",
"intersection",
"of",
"two",
"intervals",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L212-L232 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.coalesce | public Interval<C> coalesce(final Interval<C> that) {
if(this.overlaps(that)) {
return new Interval(this.dimension, this.range.span(that.range));
}
return NULL;
} | java | public Interval<C> coalesce(final Interval<C> that) {
if(this.overlaps(that)) {
return new Interval(this.dimension, this.range.span(that.range));
}
return NULL;
} | [
"public",
"Interval",
"<",
"C",
">",
"coalesce",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"if",
"(",
"this",
".",
"overlaps",
"(",
"that",
")",
")",
"{",
"return",
"new",
"Interval",
"(",
"this",
".",
"dimension",
",",
"this",
"."... | Find the coalesced result of two overlapping intervals.
@param that interval
@return coalesced interval or #NULL if none exists
@see Range#span(com.google.common.collect.Range) | [
"Find",
"the",
"coalesced",
"result",
"of",
"two",
"overlapping",
"intervals",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L253-L258 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.isConnected | public boolean isConnected(final Interval<C> that) {
if(this.hasNone() || that.hasNone()) {
return false;
}
return this.range.isConnected(that.range);
} | java | public boolean isConnected(final Interval<C> that) {
if(this.hasNone() || that.hasNone()) {
return false;
}
return this.range.isConnected(that.range);
} | [
"public",
"boolean",
"isConnected",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"if",
"(",
"this",
".",
"hasNone",
"(",
")",
"||",
"that",
".",
"hasNone",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"this",
".",
"range... | Test if two intervals are connected
@param that interval
@return true if the two intervals are connected
@see Range#isConnected(com.google.common.collect.Range) | [
"Test",
"if",
"two",
"intervals",
"are",
"connected"
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L273-L278 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.minus | @Beta
public Difference<C> minus(final Interval<C> that) {
return new Difference(this.intersect(that.ahead()),
this.intersect(that.behind()));
} | java | @Beta
public Difference<C> minus(final Interval<C> that) {
return new Difference(this.intersect(that.ahead()),
this.intersect(that.behind()));
} | [
"@",
"Beta",
"public",
"Difference",
"<",
"C",
">",
"minus",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"return",
"new",
"Difference",
"(",
"this",
".",
"intersect",
"(",
"that",
".",
"ahead",
"(",
")",
")",
",",
"this",
".",
"inter... | Experimental method to find the difference between two intervals.
@param that interval
@return the difference of this and that
@see #ahead()
@see #behind()
@see #intersect(org.nmdp.ngs.fca.Interval)
@see <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html#removeAll-java.util.Collection-">
java.util.Collection.removeAll</a>
@see <a href="https://en.wikipedia.org/wiki/Complement_(set_theory)">
complement</a> | [
"Experimental",
"method",
"to",
"find",
"the",
"difference",
"between",
"two",
"intervals",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L328-L332 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.ahead | public Interval<C> ahead() {
if(this.hasNone()) {
return new Interval(this.dimension, Range.all());
}
if(this.range.equals(Range.all())) {
return new Interval(this.dimension);
}
return new Interval(this.dimension,
Range.downTo(this.range.upperEndpoint(),
reverse(this.range.upperBoundType())));
} | java | public Interval<C> ahead() {
if(this.hasNone()) {
return new Interval(this.dimension, Range.all());
}
if(this.range.equals(Range.all())) {
return new Interval(this.dimension);
}
return new Interval(this.dimension,
Range.downTo(this.range.upperEndpoint(),
reverse(this.range.upperBoundType())));
} | [
"public",
"Interval",
"<",
"C",
">",
"ahead",
"(",
")",
"{",
"if",
"(",
"this",
".",
"hasNone",
"(",
")",
")",
"{",
"return",
"new",
"Interval",
"(",
"this",
".",
"dimension",
",",
"Range",
".",
"all",
"(",
")",
")",
";",
"}",
"if",
"(",
"this"... | Find the interval that extends ahead of this one.
@return interval with lower endpoint equal to this upper endpoint and
upper endpoint equal to infinity
@see #behind() | [
"Find",
"the",
"interval",
"that",
"extends",
"ahead",
"of",
"this",
"one",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L352-L362 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.behind | public Interval<C> behind() {
if(this.hasNone()) {
return new Interval(this.dimension, Range.all());
}
if(this.range.equals(Range.all())) {
return new Interval(this.dimension);
}
return new Interval(this.dimension,
Range.upTo(this.range.lowerEndpoint(),
reverse(this.range.lowerBoundType())));
} | java | public Interval<C> behind() {
if(this.hasNone()) {
return new Interval(this.dimension, Range.all());
}
if(this.range.equals(Range.all())) {
return new Interval(this.dimension);
}
return new Interval(this.dimension,
Range.upTo(this.range.lowerEndpoint(),
reverse(this.range.lowerBoundType())));
} | [
"public",
"Interval",
"<",
"C",
">",
"behind",
"(",
")",
"{",
"if",
"(",
"this",
".",
"hasNone",
"(",
")",
")",
"{",
"return",
"new",
"Interval",
"(",
"this",
".",
"dimension",
",",
"Range",
".",
"all",
"(",
")",
")",
";",
"}",
"if",
"(",
"this... | Find the interval that extends behind this one.
@return interval with lower endpoint equal to minus infinity and upper
endpoint equal to this lower endpoint
@see #ahead | [
"Find",
"the",
"interval",
"that",
"extends",
"behind",
"this",
"one",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L370-L380 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.gap | public Interval<C> gap(final Interval<C> that) {
if(this.before(that)) {
return this.ahead().intersect(that.behind());
}
if(this.after(that)) {
return this.behind().intersect(that.ahead());
}
return NULL;
} | java | public Interval<C> gap(final Interval<C> that) {
if(this.before(that)) {
return this.ahead().intersect(that.behind());
}
if(this.after(that)) {
return this.behind().intersect(that.ahead());
}
return NULL;
} | [
"public",
"Interval",
"<",
"C",
">",
"gap",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"if",
"(",
"this",
".",
"before",
"(",
"that",
")",
")",
"{",
"return",
"this",
".",
"ahead",
"(",
")",
".",
"intersect",
"(",
"that",
".",
"... | Find the gap between two intervals.
@param that interval
@return the interval between this and that or {@link Interval#NULL} if
none exists
@see #ahead()
@see #behind()
@see #intersect(org.nmdp.ngs.fca.Interval)
@see <a href="https://en.wikipedia.org/wiki/Commutative_property">
commutative property</a> | [
"Find",
"the",
"gap",
"between",
"two",
"intervals",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L393-L401 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.before | public boolean before(final Interval<C> that) {
if(this.hasNone() || that.hasNone()) {
return false;
}
return this.dimension == that.dimension &&
this.range.upperEndpoint().compareTo(that.range.lowerEndpoint()) < 0;
} | java | public boolean before(final Interval<C> that) {
if(this.hasNone() || that.hasNone()) {
return false;
}
return this.dimension == that.dimension &&
this.range.upperEndpoint().compareTo(that.range.lowerEndpoint()) < 0;
} | [
"public",
"boolean",
"before",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"if",
"(",
"this",
".",
"hasNone",
"(",
")",
"||",
"that",
".",
"hasNone",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"this",
".",
"dimension"... | Test if an interval precedes another.
@param that interval
@return true if this interval (upper endpoint) is before that (lower
endpoint)
@see #after(org.nmdp.ngs.fca.Interval) | [
"Test",
"if",
"an",
"interval",
"precedes",
"another",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L410-L416 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.after | public boolean after(final Interval<C> that) {
if(this.hasNone() || that.hasNone()) {
return false;
}
return that.before(this);
} | java | public boolean after(final Interval<C> that) {
if(this.hasNone() || that.hasNone()) {
return false;
}
return that.before(this);
} | [
"public",
"boolean",
"after",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"if",
"(",
"this",
".",
"hasNone",
"(",
")",
"||",
"that",
".",
"hasNone",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"that",
".",
"before",
... | Test if an interval is after another.
@param that interval
@return true if that interval (upper endpoint) is before this (lower
endpoint)
@see #before(org.nmdp.ngs.fca.Interval) | [
"Test",
"if",
"an",
"interval",
"is",
"after",
"another",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L425-L430 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.between | public boolean between(final Interval<C> that, final Interval<C> other) {
checkNotNull(this.range, that.range);
checkNotNull(other.range);
return this.after(that) && this.before(other);
} | java | public boolean between(final Interval<C> that, final Interval<C> other) {
checkNotNull(this.range, that.range);
checkNotNull(other.range);
return this.after(that) && this.before(other);
} | [
"public",
"boolean",
"between",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
",",
"final",
"Interval",
"<",
"C",
">",
"other",
")",
"{",
"checkNotNull",
"(",
"this",
".",
"range",
",",
"that",
".",
"range",
")",
";",
"checkNotNull",
"(",
"other",
... | Test if an interval is between two others.
@param that interval
@param other interval
@return true if this interval is after that and before the other
@see #before(org.nmdp.ngs.fca.Interval)
@see #after(org.nmdp.ngs.fca.Interval) | [
"Test",
"if",
"an",
"interval",
"is",
"between",
"two",
"others",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L440-L444 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.then | public boolean then(final Interval<C> that) {
checkNotNull(this.range, that.range);
return this.intersect(that).equals(this);
} | java | public boolean then(final Interval<C> that) {
checkNotNull(this.range, that.range);
return this.intersect(that).equals(this);
} | [
"public",
"boolean",
"then",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"checkNotNull",
"(",
"this",
".",
"range",
",",
"that",
".",
"range",
")",
";",
"return",
"this",
".",
"intersect",
"(",
"that",
")",
".",
"equals",
"(",
"this",
... | Test if an interval implies another.
@param that interval
@return true if all elements of this are also in that
@see #intersect(org.nmdp.ngs.fca.Interval)
@see <a href="https://en.wikipedia.org/wiki/Allen%27s_interval_algebra">
Allen's interval algebra</a> | [
"Test",
"if",
"an",
"interval",
"implies",
"another",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L466-L469 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Interval.java | Interval.ends | public boolean ends(final Interval<C> that) {
checkNotNull(this.range, that.range);
return this.dimension == that.dimension &&
this.range.upperEndpoint().compareTo(that.range.upperEndpoint()) == 0 &&
this.range.lowerEndpoint().compareTo(that.range.lowerEndpoint()) > 0;
} | java | public boolean ends(final Interval<C> that) {
checkNotNull(this.range, that.range);
return this.dimension == that.dimension &&
this.range.upperEndpoint().compareTo(that.range.upperEndpoint()) == 0 &&
this.range.lowerEndpoint().compareTo(that.range.lowerEndpoint()) > 0;
} | [
"public",
"boolean",
"ends",
"(",
"final",
"Interval",
"<",
"C",
">",
"that",
")",
"{",
"checkNotNull",
"(",
"this",
".",
"range",
",",
"that",
".",
"range",
")",
";",
"return",
"this",
".",
"dimension",
"==",
"that",
".",
"dimension",
"&&",
"this",
... | Test if an interval ends another.
@param that interval
@return true if the intervals share a common upper endpoint (end) and
this lower endpoint is greater than that
@see #starts(org.nmdp.ngs.fca.Interval)
@see <a href="https://en.wikipedia.org/wiki/Allen%27s_interval_algebra">
Allen's interval algebra</a> | [
"Test",
"if",
"an",
"interval",
"ends",
"another",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Interval.java#L496-L501 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/Poset.java | Poset.singletons | public static <C extends Comparable<?>> List<Poset<C>> singletons(final Collection<? extends C> collection) {
List<Poset<C>> singletons = new ArrayList();
Poset previous = NULL;
for(C element : collection) {
List<C> set = new ArrayList<>();
set.add(element);
Poset poset = new Poset(set);
if(previous != NULL && poset.isComparableTo(previous)) {
throw new IllegalArgumentException("singletons must be disjoint");
}
singletons.add(poset);
previous = poset;
}
return singletons;
} | java | public static <C extends Comparable<?>> List<Poset<C>> singletons(final Collection<? extends C> collection) {
List<Poset<C>> singletons = new ArrayList();
Poset previous = NULL;
for(C element : collection) {
List<C> set = new ArrayList<>();
set.add(element);
Poset poset = new Poset(set);
if(previous != NULL && poset.isComparableTo(previous)) {
throw new IllegalArgumentException("singletons must be disjoint");
}
singletons.add(poset);
previous = poset;
}
return singletons;
} | [
"public",
"static",
"<",
"C",
"extends",
"Comparable",
"<",
"?",
">",
">",
"List",
"<",
"Poset",
"<",
"C",
">",
">",
"singletons",
"(",
"final",
"Collection",
"<",
"?",
"extends",
"C",
">",
"collection",
")",
"{",
"List",
"<",
"Poset",
"<",
"C",
">... | Calculate partially ordered singletons from a totally-ordered collection.
@param <C> comparable element type
@param collection of comparable elements
@return list of partially ordered singleton sets
@throws IllegalArgumentException if collection elements are not disjoint | [
"Calculate",
"partially",
"ordered",
"singletons",
"from",
"a",
"totally",
"-",
"ordered",
"collection",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/Poset.java#L79-L96 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/HtmlValidatorUtil.java | HtmlValidatorUtil.validateHtml | public static void validateHtml(final File validationResultDir, final Configuration props, final File file) throws IOException {
Preconditions.checkArgument(StringUtils.isNotBlank(props.get(WebConstants.W3C_MARKUP_VALIDATION_URL)));
InputStream is = null;
BufferedReader br = null;
InputStream fis = null;
try {
// Post HTML file to markup validation service as multipart/form-data
URL url = new URL(props.get(WebConstants.W3C_MARKUP_VALIDATION_URL));
URLConnection uc = url.openConnection();
MultipartPostRequest request = new MultipartPostRequest(uc);
fis = new FileInputStream(file);
/*
* See http://validator.w3.org/docs/api.html#requestformat for a description of all
* parameters
*/
request.setParameter("uploaded_file", file.getPath(), fis);
is = request.post();
// Summary of validation is available in the HTTP headers
String status = uc.getHeaderField(STATUS);
int errors = Integer.parseInt(uc.getHeaderField(ERRORS));
LOG.info("Page " + file.getName() + ": Number of HTML validation errors=" + errors);
int warnings = Integer.parseInt(uc.getHeaderField(WARNINGS));
LOG.info("Page " + file.getName() + ": Number of HTML validation warnings=" + warnings);
// Check if result file has to be written
String level = props.get(WebConstants.W3C_MARKUP_VALIDATION_LEVEL, "ERROR");
boolean validate = false;
if (StringUtils.equalsIgnoreCase(level, "WARNING") && (warnings > 0 || errors > 0)) {
validate = true;
} else if (StringUtils.equalsIgnoreCase(level, "ERROR") && errors > 0) {
validate = true;
} else if (StringUtils.equalsIgnoreCase("Invalid", status)) {
validate = true;
}
if (validate) {
br = new BufferedReader(new InputStreamReader(is));
String line = null;
StringBuffer sb = new StringBuffer();
while ((line = br.readLine()) != null) {
sb.append(line);
sb.append('\n');
}
PrintWriter writer = null;
String fileName = file.getName().substring(0, file.getName().length() - 5) + "_validation_result.html";
FileUtils.forceMkdir(validationResultDir);
File validationResultFile = new File(validationResultDir, fileName);
try {
writer = new PrintWriter(validationResultFile, "UTF-8");
writer.write(sb.toString());
LOG.info("Validation result saved in file " + validationResultFile.getName());
} catch (IOException ex) {
LOG.error("Could not write HTML file " + validationResultFile.getName() + "to directory", ex);
} finally {
IOUtils.closeQuietly(writer);
}
}
} finally {
IOUtils.closeQuietly(br);
IOUtils.closeQuietly(fis);
}
} | java | public static void validateHtml(final File validationResultDir, final Configuration props, final File file) throws IOException {
Preconditions.checkArgument(StringUtils.isNotBlank(props.get(WebConstants.W3C_MARKUP_VALIDATION_URL)));
InputStream is = null;
BufferedReader br = null;
InputStream fis = null;
try {
// Post HTML file to markup validation service as multipart/form-data
URL url = new URL(props.get(WebConstants.W3C_MARKUP_VALIDATION_URL));
URLConnection uc = url.openConnection();
MultipartPostRequest request = new MultipartPostRequest(uc);
fis = new FileInputStream(file);
/*
* See http://validator.w3.org/docs/api.html#requestformat for a description of all
* parameters
*/
request.setParameter("uploaded_file", file.getPath(), fis);
is = request.post();
// Summary of validation is available in the HTTP headers
String status = uc.getHeaderField(STATUS);
int errors = Integer.parseInt(uc.getHeaderField(ERRORS));
LOG.info("Page " + file.getName() + ": Number of HTML validation errors=" + errors);
int warnings = Integer.parseInt(uc.getHeaderField(WARNINGS));
LOG.info("Page " + file.getName() + ": Number of HTML validation warnings=" + warnings);
// Check if result file has to be written
String level = props.get(WebConstants.W3C_MARKUP_VALIDATION_LEVEL, "ERROR");
boolean validate = false;
if (StringUtils.equalsIgnoreCase(level, "WARNING") && (warnings > 0 || errors > 0)) {
validate = true;
} else if (StringUtils.equalsIgnoreCase(level, "ERROR") && errors > 0) {
validate = true;
} else if (StringUtils.equalsIgnoreCase("Invalid", status)) {
validate = true;
}
if (validate) {
br = new BufferedReader(new InputStreamReader(is));
String line = null;
StringBuffer sb = new StringBuffer();
while ((line = br.readLine()) != null) {
sb.append(line);
sb.append('\n');
}
PrintWriter writer = null;
String fileName = file.getName().substring(0, file.getName().length() - 5) + "_validation_result.html";
FileUtils.forceMkdir(validationResultDir);
File validationResultFile = new File(validationResultDir, fileName);
try {
writer = new PrintWriter(validationResultFile, "UTF-8");
writer.write(sb.toString());
LOG.info("Validation result saved in file " + validationResultFile.getName());
} catch (IOException ex) {
LOG.error("Could not write HTML file " + validationResultFile.getName() + "to directory", ex);
} finally {
IOUtils.closeQuietly(writer);
}
}
} finally {
IOUtils.closeQuietly(br);
IOUtils.closeQuietly(fis);
}
} | [
"public",
"static",
"void",
"validateHtml",
"(",
"final",
"File",
"validationResultDir",
",",
"final",
"Configuration",
"props",
",",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"StringUtils",
".",
"isNot... | Validates an HTML file against the W3C markup validation service.
@param validationResultDir
target directory for validation result file
@param props
properties must include the keys {@link WebConstants#W3C_MARKUP_VALIDATION_URL}
and {@link WebConstants#W3C_MARKUP_VALIDATION_LEVEL}
@param file
HTML file which will be validated | [
"Validates",
"an",
"HTML",
"file",
"against",
"the",
"W3C",
"markup",
"validation",
"service",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/HtmlValidatorUtil.java#L62-L124 | train |
nmdp-bioinformatics/ngs | tools/src/main/java/org/nmdp/ngs/tools/FilterInterpretableExons.java | FilterInterpretableExons.writeSequenceToTempFile | static File writeSequenceToTempFile(final Sequence sequence) throws IOException {
File tmp = File.createTempFile(sequence.getName() + "-", ".fa");
try (FileOutputStream outputStream = new FileOutputStream(tmp)) {
SeqIOTools.writeFasta(outputStream, sequence);
}
return tmp;
} | java | static File writeSequenceToTempFile(final Sequence sequence) throws IOException {
File tmp = File.createTempFile(sequence.getName() + "-", ".fa");
try (FileOutputStream outputStream = new FileOutputStream(tmp)) {
SeqIOTools.writeFasta(outputStream, sequence);
}
return tmp;
} | [
"static",
"File",
"writeSequenceToTempFile",
"(",
"final",
"Sequence",
"sequence",
")",
"throws",
"IOException",
"{",
"File",
"tmp",
"=",
"File",
".",
"createTempFile",
"(",
"sequence",
".",
"getName",
"(",
")",
"+",
"\"-\"",
",",
"\".fa\"",
")",
";",
"try",... | Write the specified sequence to a temporary file in FASTA format.
@param sequence sequence to write
@return temporary file in FASTA format
@throws IOException if an I/O error occurs | [
"Write",
"the",
"specified",
"sequence",
"to",
"a",
"temporary",
"file",
"in",
"FASTA",
"format",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/tools/src/main/java/org/nmdp/ngs/tools/FilterInterpretableExons.java#L129-L135 | train |
nmdp-bioinformatics/ngs | align/src/main/java/org/nmdp/ngs/align/Genewise.java | Genewise.genewiseExons | public static Iterable<GenewiseExon> genewiseExons(final File aminoAcidHmm2File, final File genomicDnaFastaFile) throws IOException {
checkNotNull(aminoAcidHmm2File);
checkNotNull(genomicDnaFastaFile);
File genewiseResult = File.createTempFile("genewise", ".txt");
ProcessBuilder genewise = new ProcessBuilder("genewise",
"-hmmer", "-tfor", "-genes", "-nosplice_gtag",
aminoAcidHmm2File.getPath(), genomicDnaFastaFile.getPath());
genewise.redirectErrorStream(true);
genewise.redirectOutput(ProcessBuilder.Redirect.to(genewiseResult));
Process genewiseProcess = genewise.start();
try {
genewiseProcess.waitFor();
}
catch (InterruptedException e) {
// ignore
}
int lineNumber = 0;
BufferedReader reader = null;
List<GenewiseExon> exons = Lists.newLinkedList();
try {
reader = new BufferedReader(new FileReader(genewiseResult));
while (reader.ready()) {
String line = reader.readLine();
if (line == null) {
break;
}
if (line.startsWith(" Exon")) {
List<String> tokens = SPLITTER.splitToList(line);
if (tokens.size() < 5) {
throw new IOException("invalid genewise genes format at line number " + lineNumber + ", line " + line);
}
try {
long start = Long.parseLong(tokens.get(1));
long end = Long.parseLong(tokens.get(2));
if (start > end) {
throw new IOException("invalid genewise exon at line number " + lineNumber + ", start > end");
}
int phase = Integer.parseInt(tokens.get(4));
exons.add(new GenewiseExon(start, end, phase));
}
catch (NumberFormatException e) {
throw new IOException("invalid genewise exon at line number " + lineNumber + ", caught " + e.getMessage());
}
}
lineNumber++;
}
}
finally {
try {
reader.close();
}
catch (Exception e) {
// empty
}
try {
genewiseResult.delete();
}
catch (Exception e) {
// empty
}
}
return ImmutableList.copyOf(exons);
} | java | public static Iterable<GenewiseExon> genewiseExons(final File aminoAcidHmm2File, final File genomicDnaFastaFile) throws IOException {
checkNotNull(aminoAcidHmm2File);
checkNotNull(genomicDnaFastaFile);
File genewiseResult = File.createTempFile("genewise", ".txt");
ProcessBuilder genewise = new ProcessBuilder("genewise",
"-hmmer", "-tfor", "-genes", "-nosplice_gtag",
aminoAcidHmm2File.getPath(), genomicDnaFastaFile.getPath());
genewise.redirectErrorStream(true);
genewise.redirectOutput(ProcessBuilder.Redirect.to(genewiseResult));
Process genewiseProcess = genewise.start();
try {
genewiseProcess.waitFor();
}
catch (InterruptedException e) {
// ignore
}
int lineNumber = 0;
BufferedReader reader = null;
List<GenewiseExon> exons = Lists.newLinkedList();
try {
reader = new BufferedReader(new FileReader(genewiseResult));
while (reader.ready()) {
String line = reader.readLine();
if (line == null) {
break;
}
if (line.startsWith(" Exon")) {
List<String> tokens = SPLITTER.splitToList(line);
if (tokens.size() < 5) {
throw new IOException("invalid genewise genes format at line number " + lineNumber + ", line " + line);
}
try {
long start = Long.parseLong(tokens.get(1));
long end = Long.parseLong(tokens.get(2));
if (start > end) {
throw new IOException("invalid genewise exon at line number " + lineNumber + ", start > end");
}
int phase = Integer.parseInt(tokens.get(4));
exons.add(new GenewiseExon(start, end, phase));
}
catch (NumberFormatException e) {
throw new IOException("invalid genewise exon at line number " + lineNumber + ", caught " + e.getMessage());
}
}
lineNumber++;
}
}
finally {
try {
reader.close();
}
catch (Exception e) {
// empty
}
try {
genewiseResult.delete();
}
catch (Exception e) {
// empty
}
}
return ImmutableList.copyOf(exons);
} | [
"public",
"static",
"Iterable",
"<",
"GenewiseExon",
">",
"genewiseExons",
"(",
"final",
"File",
"aminoAcidHmm2File",
",",
"final",
"File",
"genomicDnaFastaFile",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"aminoAcidHmm2File",
")",
";",
"checkNotNull",
... | Return the exons predicted from the alignment of the specified amino acid HMM file in HMMER2 format against
the specified genomic DNA sequence file in FASTA format.
@param aminoAcidHmm2File amino acid HMM file in HMMER2 format, must not be null
@param genomicDnaFastaFile genomic DNA sequence file in FASTA format, must not be null
@return zero or more exons predicted from the alignment of the specified amino acid HMM file in HMMER2 format against
the specified genomic DNA sequence file in FASTA format
@throws IOException if an I/O error occurs | [
"Return",
"the",
"exons",
"predicted",
"from",
"the",
"alignment",
"of",
"the",
"specified",
"amino",
"acid",
"HMM",
"file",
"in",
"HMMER2",
"format",
"against",
"the",
"specified",
"genomic",
"DNA",
"sequence",
"file",
"in",
"FASTA",
"format",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/Genewise.java#L65-L132 | train |
sualeh/pointlocation6709 | src/main/java/us/fatehi/pointlocation6709/parse/CoordinateParser.java | CoordinateParser.parseLatitude | public Latitude parseLatitude(final String latitudeString)
throws ParserException
{
try
{
final Latitude latitude = new Latitude(parseAngle(latitudeString));
return latitude;
}
catch (final RuntimeException e)
{
throw new ParserException("Cannot parse latitude: " + latitudeString);
}
} | java | public Latitude parseLatitude(final String latitudeString)
throws ParserException
{
try
{
final Latitude latitude = new Latitude(parseAngle(latitudeString));
return latitude;
}
catch (final RuntimeException e)
{
throw new ParserException("Cannot parse latitude: " + latitudeString);
}
} | [
"public",
"Latitude",
"parseLatitude",
"(",
"final",
"String",
"latitudeString",
")",
"throws",
"ParserException",
"{",
"try",
"{",
"final",
"Latitude",
"latitude",
"=",
"new",
"Latitude",
"(",
"parseAngle",
"(",
"latitudeString",
")",
")",
";",
"return",
"latit... | Parses a string representation of the latitude.
@param latitudeString
String representation of the point location
@return Latitude
@throws ParserException
On an exception | [
"Parses",
"a",
"string",
"representation",
"of",
"the",
"latitude",
"."
] | c0c186c2518f41e3fe174920cacd5c0d082d01a0 | https://github.com/sualeh/pointlocation6709/blob/c0c186c2518f41e3fe174920cacd5c0d082d01a0/src/main/java/us/fatehi/pointlocation6709/parse/CoordinateParser.java#L94-L107 | train |
sualeh/pointlocation6709 | src/main/java/us/fatehi/pointlocation6709/parse/CoordinateParser.java | CoordinateParser.parseLongitude | public Longitude parseLongitude(final String longitudeString)
throws ParserException
{
try
{
final Longitude longitude = new Longitude(parseAngle(longitudeString));
return longitude;
}
catch (final RuntimeException e)
{
throw new ParserException("Cannot parse longitude: " + longitudeString);
}
} | java | public Longitude parseLongitude(final String longitudeString)
throws ParserException
{
try
{
final Longitude longitude = new Longitude(parseAngle(longitudeString));
return longitude;
}
catch (final RuntimeException e)
{
throw new ParserException("Cannot parse longitude: " + longitudeString);
}
} | [
"public",
"Longitude",
"parseLongitude",
"(",
"final",
"String",
"longitudeString",
")",
"throws",
"ParserException",
"{",
"try",
"{",
"final",
"Longitude",
"longitude",
"=",
"new",
"Longitude",
"(",
"parseAngle",
"(",
"longitudeString",
")",
")",
";",
"return",
... | Parses a string representation of the longitude.
@param longitudeString
String representation of the longitude
@return Longitude
@throws ParserException
On an exception | [
"Parses",
"a",
"string",
"representation",
"of",
"the",
"longitude",
"."
] | c0c186c2518f41e3fe174920cacd5c0d082d01a0 | https://github.com/sualeh/pointlocation6709/blob/c0c186c2518f41e3fe174920cacd5c0d082d01a0/src/main/java/us/fatehi/pointlocation6709/parse/CoordinateParser.java#L118-L131 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/DumpFileCreator.java | DumpFileCreator.createDumpFile | public File createDumpFile(final File dir, final String extension, final String urlString, final String additionalInfo) {
URI uri = URI.create(urlString);
String path = uri.getPath();
if (path == null) {
log.warn("Cannot create dump file for URI: " + uri);
return null;
}
String name = PATTERN_FIRST_LAST_SLASH.matcher(path).replaceAll("$1");
name = PATTERN_ILLEGAL_CHARS.matcher(name).replaceAll("_");
Key key = Key.get(dir.getPath(), extension);
MutableInt counter = countersMap.get(key);
if (counter == null) {
counter = new MutableInt();
countersMap.put(key, counter);
}
int counterValue = counter.intValue();
counter.increment();
StringBuilder sb = new StringBuilder();
sb.append(String.format("%04d", counterValue));
sb.append('_');
sb.append(name);
if (StringUtils.isNotBlank(additionalInfo)) {
sb.append("_");
sb.append(additionalInfo);
}
sb.append(".");
sb.append(extension);
return new File(dir, sb.toString());
} | java | public File createDumpFile(final File dir, final String extension, final String urlString, final String additionalInfo) {
URI uri = URI.create(urlString);
String path = uri.getPath();
if (path == null) {
log.warn("Cannot create dump file for URI: " + uri);
return null;
}
String name = PATTERN_FIRST_LAST_SLASH.matcher(path).replaceAll("$1");
name = PATTERN_ILLEGAL_CHARS.matcher(name).replaceAll("_");
Key key = Key.get(dir.getPath(), extension);
MutableInt counter = countersMap.get(key);
if (counter == null) {
counter = new MutableInt();
countersMap.put(key, counter);
}
int counterValue = counter.intValue();
counter.increment();
StringBuilder sb = new StringBuilder();
sb.append(String.format("%04d", counterValue));
sb.append('_');
sb.append(name);
if (StringUtils.isNotBlank(additionalInfo)) {
sb.append("_");
sb.append(additionalInfo);
}
sb.append(".");
sb.append(extension);
return new File(dir, sb.toString());
} | [
"public",
"File",
"createDumpFile",
"(",
"final",
"File",
"dir",
",",
"final",
"String",
"extension",
",",
"final",
"String",
"urlString",
",",
"final",
"String",
"additionalInfo",
")",
"{",
"URI",
"uri",
"=",
"URI",
".",
"create",
"(",
"urlString",
")",
"... | Computes the best file to save the response to the current page. | [
"Computes",
"the",
"best",
"file",
"to",
"save",
"the",
"response",
"to",
"the",
"current",
"page",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/DumpFileCreator.java#L52-L85 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java | ReturnUrl.getReturnItemUrl | public static MozuUrl getReturnItemUrl(String responseFields, String returnId, String returnItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/items/{returnItemId}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("returnId", returnId);
formatter.formatUrl("returnItemId", returnItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getReturnItemUrl(String responseFields, String returnId, String returnItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/items/{returnItemId}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("returnId", returnId);
formatter.formatUrl("returnItemId", returnItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getReturnItemUrl",
"(",
"String",
"responseFields",
",",
"String",
"returnId",
",",
"String",
"returnItemId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/returns/{returnId}/items/{returnItemId}?res... | Get Resource Url for GetReturnItem
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param returnId Unique identifier of the return whose items you want to get.
@param returnItemId Unique identifier of the return item whose details you want to get.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetReturnItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java#L57-L64 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java | ReturnUrl.getAvailablePaymentActionsForReturnUrl | public static MozuUrl getAvailablePaymentActionsForReturnUrl(String paymentId, String returnId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/payments/{paymentId}/actions");
formatter.formatUrl("paymentId", paymentId);
formatter.formatUrl("returnId", returnId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getAvailablePaymentActionsForReturnUrl(String paymentId, String returnId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/payments/{paymentId}/actions");
formatter.formatUrl("paymentId", paymentId);
formatter.formatUrl("returnId", returnId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getAvailablePaymentActionsForReturnUrl",
"(",
"String",
"paymentId",
",",
"String",
"returnId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/returns/{returnId}/payments/{paymentId}/actions\"",
")",
";... | Get Resource Url for GetAvailablePaymentActionsForReturn
@param paymentId Unique identifier of the payment for which to perform the action.
@param returnId Unique identifier of the return whose items you want to get.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetAvailablePaymentActionsForReturn"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java#L86-L92 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java | ReturnUrl.resendReturnEmailUrl | public static MozuUrl resendReturnEmailUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/email/resend");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl resendReturnEmailUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/email/resend");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"resendReturnEmailUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/returns/email/resend\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
"(",
")",
","... | Get Resource Url for ResendReturnEmail
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"ResendReturnEmail"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java#L250-L254 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java | ReturnUrl.deleteOrderItemUrl | public static MozuUrl deleteOrderItemUrl(String returnId, String returnItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{orderId}/items/{orderItemId}?updatemode={updateMode}&version={version}");
formatter.formatUrl("returnId", returnId);
formatter.formatUrl("returnItemId", returnItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteOrderItemUrl(String returnId, String returnItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{orderId}/items/{orderItemId}?updatemode={updateMode}&version={version}");
formatter.formatUrl("returnId", returnId);
formatter.formatUrl("returnItemId", returnItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteOrderItemUrl",
"(",
"String",
"returnId",
",",
"String",
"returnItemId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/returns/{orderId}/items/{orderItemId}?updatemode={updateMode}&version={version}\... | Get Resource Url for DeleteOrderItem
@param returnId Unique identifier of the return whose items you want to get.
@param returnItemId Unique identifier of the return item whose details you want to get.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteOrderItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java#L262-L268 | train |
mgm-tp/jfunk | jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccount.java | MailAccount.setAddress | public void setAddress(final String address) {
// Do we have a subaddressing account?
Preconditions.checkArgument(StringUtils.startsWith(this.address, accountId + "+"),
"Mail address can only be changed when subaddressing is active");
Preconditions.checkArgument(StringUtils.startsWith(address, accountId), "New mail address %s does not start with accountId=%s", address,
accountId);
log.info("Changing mail address from {} to {}", this.address, address);
this.address = address;
} | java | public void setAddress(final String address) {
// Do we have a subaddressing account?
Preconditions.checkArgument(StringUtils.startsWith(this.address, accountId + "+"),
"Mail address can only be changed when subaddressing is active");
Preconditions.checkArgument(StringUtils.startsWith(address, accountId), "New mail address %s does not start with accountId=%s", address,
accountId);
log.info("Changing mail address from {} to {}", this.address, address);
this.address = address;
} | [
"public",
"void",
"setAddress",
"(",
"final",
"String",
"address",
")",
"{",
"// Do we have a subaddressing account?\r",
"Preconditions",
".",
"checkArgument",
"(",
"StringUtils",
".",
"startsWith",
"(",
"this",
".",
"address",
",",
"accountId",
"+",
"\"+\"",
")",
... | Allows to set a new mail address. This is only possible when mail subaddressing is active and
the new mail address belongs to the defined mail accountId.
@param address
the new mail address | [
"Allows",
"to",
"set",
"a",
"new",
"mail",
"address",
".",
"This",
"is",
"only",
"possible",
"when",
"mail",
"subaddressing",
"is",
"active",
"and",
"the",
"new",
"mail",
"address",
"belongs",
"to",
"the",
"defined",
"mail",
"accountId",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailAccount.java#L136-L144 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java | SearchUrl.getSynonymDefinitionCollectionUrl | public static MozuUrl getSynonymDefinitionCollectionUrl(String localeCode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/synonym-definitions/{localeCode}?responseFields={responseFields}");
formatter.formatUrl("localeCode", localeCode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getSynonymDefinitionCollectionUrl(String localeCode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/synonym-definitions/{localeCode}?responseFields={responseFields}");
formatter.formatUrl("localeCode", localeCode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getSynonymDefinitionCollectionUrl",
"(",
"String",
"localeCode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/search/synonym-definitions/{localeCode}?respons... | Get Resource Url for GetSynonymDefinitionCollection
@param localeCode The two character country code that sets the locale, such as US for United States. Sites, tenants, and catalogs use locale codes for localizing content, such as translated product text per supported country.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetSynonymDefinitionCollection"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java#L80-L86 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java | SearchUrl.updateSearchTuningRuleUrl | public static MozuUrl updateSearchTuningRuleUrl(String responseFields, String searchTuningRuleCode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCode}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("searchTuningRuleCode", searchTuningRuleCode);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateSearchTuningRuleUrl(String responseFields, String searchTuningRuleCode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCode}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("searchTuningRuleCode", searchTuningRuleCode);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateSearchTuningRuleUrl",
"(",
"String",
"responseFields",
",",
"String",
"searchTuningRuleCode",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCod... | Get Resource Url for UpdateSearchTuningRule
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param searchTuningRuleCode The unique identifier of the search tuning rule.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateSearchTuningRule"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java#L178-L184 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java | SearchUrl.updateSynonymDefinitionUrl | public static MozuUrl updateSynonymDefinitionUrl(String responseFields, Integer synonymId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/synonyms/{synonymId}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("synonymId", synonymId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateSynonymDefinitionUrl(String responseFields, Integer synonymId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/synonyms/{synonymId}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("synonymId", synonymId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateSynonymDefinitionUrl",
"(",
"String",
"responseFields",
",",
"Integer",
"synonymId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/search/synonyms/{synonymId}?responseFields={responseFi... | Get Resource Url for UpdateSynonymDefinition
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param synonymId The unique identifier of the synonym definition.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateSynonymDefinition"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java#L204-L210 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java | SearchUrl.deleteSearchTuningRuleUrl | public static MozuUrl deleteSearchTuningRuleUrl(String searchTuningRuleCode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCode}");
formatter.formatUrl("searchTuningRuleCode", searchTuningRuleCode);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteSearchTuningRuleUrl(String searchTuningRuleCode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCode}");
formatter.formatUrl("searchTuningRuleCode", searchTuningRuleCode);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteSearchTuningRuleUrl",
"(",
"String",
"searchTuningRuleCode",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCode}\"",
")",
";",
"formatter",
"... | Get Resource Url for DeleteSearchTuningRule
@param searchTuningRuleCode The unique identifier of the search tuning rule.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteSearchTuningRule"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java#L217-L222 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java | SearchUrl.deleteSynonymDefinitionUrl | public static MozuUrl deleteSynonymDefinitionUrl(Integer synonymId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/synonyms/{synonymId}");
formatter.formatUrl("synonymId", synonymId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteSynonymDefinitionUrl(Integer synonymId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/synonyms/{synonymId}");
formatter.formatUrl("synonymId", synonymId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteSynonymDefinitionUrl",
"(",
"Integer",
"synonymId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/search/synonyms/{synonymId}\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"... | Get Resource Url for DeleteSynonymDefinition
@param synonymId The unique identifier of the synonym definition.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteSynonymDefinition"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java#L229-L234 | train |
EsupPortail/esup-smsu-api | src/main/java/org/esupportail/smsuapi/services/scheduler/AbstractQuartzJob.java | AbstractQuartzJob.getApplicationContext | public ApplicationContext getApplicationContext(final JobExecutionContext context) throws JobExecutionException {
SchedulerContext schedulerContext;
try {
final Scheduler scheduler = context.getScheduler();
schedulerContext = scheduler.getContext();
} catch (SchedulerException e) {
logger.error("Unable to retrieve the scheduler context, cause : ", e);
throw new JobExecutionException(e);
}
final ApplicationContext applicationContext = (ApplicationContext) schedulerContext.get(APPLICATION_CONTEXT_BEAN_NAME);
return applicationContext;
} | java | public ApplicationContext getApplicationContext(final JobExecutionContext context) throws JobExecutionException {
SchedulerContext schedulerContext;
try {
final Scheduler scheduler = context.getScheduler();
schedulerContext = scheduler.getContext();
} catch (SchedulerException e) {
logger.error("Unable to retrieve the scheduler context, cause : ", e);
throw new JobExecutionException(e);
}
final ApplicationContext applicationContext = (ApplicationContext) schedulerContext.get(APPLICATION_CONTEXT_BEAN_NAME);
return applicationContext;
} | [
"public",
"ApplicationContext",
"getApplicationContext",
"(",
"final",
"JobExecutionContext",
"context",
")",
"throws",
"JobExecutionException",
"{",
"SchedulerContext",
"schedulerContext",
";",
"try",
"{",
"final",
"Scheduler",
"scheduler",
"=",
"context",
".",
"getSched... | Retrieves the spring application context from the job execution context.
@param context the quartz job execution context which is used to retrieve the spring application context bean.
@return the spring application context bean. | [
"Retrieves",
"the",
"spring",
"application",
"context",
"from",
"the",
"job",
"execution",
"context",
"."
] | 7b6a4388065adfd84655dbc83f37080874953b20 | https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/services/scheduler/AbstractQuartzJob.java#L47-L58 | train |
EsupPortail/esup-smsu-api | src/main/java/org/esupportail/smsuapi/services/scheduler/AbstractQuartzJob.java | AbstractQuartzJob.getQuartzExceptionHandler | public QuartzExceptionHandler getQuartzExceptionHandler(final JobExecutionContext context) {
QuartzExceptionHandler exceptionHandler = null;
try {
final ApplicationContext applicationContext = getApplicationContext(context);
exceptionHandler = (QuartzExceptionHandler) applicationContext.getBean(QUARTZ_EXCEPTION_HANDLER_BEAN_NAME);
} catch (JobExecutionException e) {
logger.error("An error occurs getting the Quartz exception Handler", e);
}
return exceptionHandler;
} | java | public QuartzExceptionHandler getQuartzExceptionHandler(final JobExecutionContext context) {
QuartzExceptionHandler exceptionHandler = null;
try {
final ApplicationContext applicationContext = getApplicationContext(context);
exceptionHandler = (QuartzExceptionHandler) applicationContext.getBean(QUARTZ_EXCEPTION_HANDLER_BEAN_NAME);
} catch (JobExecutionException e) {
logger.error("An error occurs getting the Quartz exception Handler", e);
}
return exceptionHandler;
} | [
"public",
"QuartzExceptionHandler",
"getQuartzExceptionHandler",
"(",
"final",
"JobExecutionContext",
"context",
")",
"{",
"QuartzExceptionHandler",
"exceptionHandler",
"=",
"null",
";",
"try",
"{",
"final",
"ApplicationContext",
"applicationContext",
"=",
"getApplicationCont... | Retrieve the quartz exception handler bean.
@param context
@return | [
"Retrieve",
"the",
"quartz",
"exception",
"handler",
"bean",
"."
] | 7b6a4388065adfd84655dbc83f37080874953b20 | https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/services/scheduler/AbstractQuartzJob.java#L65-L77 | train |
EsupPortail/esup-smsu-api | src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java | StatisticBuilder.buildAllStatistics | public void buildAllStatistics() {
for (Map<String,?> map : daoService.getAppsAndCountsToTreat()) {
// get the date of older SMS for this app and account
final Application application = (Application) map.get(Sms.PROP_APP);
final Account account = (Account) map.get(Sms.PROP_ACC);
final Date olderSmsDate = daoService.getDateOfOlderSmsByApplicationAndAccount(application, account);
// if there is not at least 1 sms in db for the specified app / account, the
// previous method returns null, so we have to check it.
if (olderSmsDate != null) {
// get the list of month where stats was not computed since the date of the older SMS in DB
for (Date monthToComputeStats : getListOfMarkerDateForNonComputedStats(application, account, olderSmsDate)) {
// compute the stats for this specific app, account and month
buildStatisticForAMonth(application, account, monthToComputeStats);
}
}
}
} | java | public void buildAllStatistics() {
for (Map<String,?> map : daoService.getAppsAndCountsToTreat()) {
// get the date of older SMS for this app and account
final Application application = (Application) map.get(Sms.PROP_APP);
final Account account = (Account) map.get(Sms.PROP_ACC);
final Date olderSmsDate = daoService.getDateOfOlderSmsByApplicationAndAccount(application, account);
// if there is not at least 1 sms in db for the specified app / account, the
// previous method returns null, so we have to check it.
if (olderSmsDate != null) {
// get the list of month where stats was not computed since the date of the older SMS in DB
for (Date monthToComputeStats : getListOfMarkerDateForNonComputedStats(application, account, olderSmsDate)) {
// compute the stats for this specific app, account and month
buildStatisticForAMonth(application, account, monthToComputeStats);
}
}
}
} | [
"public",
"void",
"buildAllStatistics",
"(",
")",
"{",
"for",
"(",
"Map",
"<",
"String",
",",
"?",
">",
"map",
":",
"daoService",
".",
"getAppsAndCountsToTreat",
"(",
")",
")",
"{",
"// get the date of older SMS for this app and account\r",
"final",
"Application",
... | Build all non already computed statistic whatever the application, account or date. | [
"Build",
"all",
"non",
"already",
"computed",
"statistic",
"whatever",
"the",
"application",
"account",
"or",
"date",
"."
] | 7b6a4388065adfd84655dbc83f37080874953b20 | https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java#L40-L57 | train |
EsupPortail/esup-smsu-api | src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java | StatisticBuilder.buildStatisticForAMonth | private void buildStatisticForAMonth(Application application, Account account, Date month) {
buildStatistics(
application, account,
getFirstDayOfMonth(month),
getLastDayOfMonth(month),
getMarkerDateOfMonth(month));
} | java | private void buildStatisticForAMonth(Application application, Account account, Date month) {
buildStatistics(
application, account,
getFirstDayOfMonth(month),
getLastDayOfMonth(month),
getMarkerDateOfMonth(month));
} | [
"private",
"void",
"buildStatisticForAMonth",
"(",
"Application",
"application",
",",
"Account",
"account",
",",
"Date",
"month",
")",
"{",
"buildStatistics",
"(",
"application",
",",
"account",
",",
"getFirstDayOfMonth",
"(",
"month",
")",
",",
"getLastDayOfMonth",... | Create stats in DB for the specified application and account for the month.
@param application
@param account
@param month | [
"Create",
"stats",
"in",
"DB",
"for",
"the",
"specified",
"application",
"and",
"account",
"for",
"the",
"month",
"."
] | 7b6a4388065adfd84655dbc83f37080874953b20 | https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java#L65-L71 | train |
EsupPortail/esup-smsu-api | src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java | StatisticBuilder.getLastDayOfMonth | private Date getLastDayOfMonth(final Date date) {
final Calendar calendar = toGregorianCalendar(date);
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
return calendar.getTime();
} | java | private Date getLastDayOfMonth(final Date date) {
final Calendar calendar = toGregorianCalendar(date);
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
return calendar.getTime();
} | [
"private",
"Date",
"getLastDayOfMonth",
"(",
"final",
"Date",
"date",
")",
"{",
"final",
"Calendar",
"calendar",
"=",
"toGregorianCalendar",
"(",
"date",
")",
";",
"calendar",
".",
"set",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
",",
"calendar",
".",
"getActualMa... | Return the last day of month at 23h59.
@param date
@return | [
"Return",
"the",
"last",
"day",
"of",
"month",
"at",
"23h59",
"."
] | 7b6a4388065adfd84655dbc83f37080874953b20 | https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java#L151-L161 | train |
EsupPortail/esup-smsu-api | src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java | StatisticBuilder.getListOfMarkerDateBetWeenTwoDates | private List<Date> getListOfMarkerDateBetWeenTwoDates(final Date startDate, final Date endDate) {
final List<Date> listOfMarkerDate = new LinkedList<>();
final Calendar startDateAsCal = toGregorianCalendar(startDate);
final Calendar endDateAsCal = toGregorianCalendar(endDate);
while (startDateAsCal.before(endDateAsCal)) {
listOfMarkerDate.add(getMarkerDateOfMonth(startDateAsCal.getTime()));
startDateAsCal.add(Calendar.MONTH, 1);
}
return listOfMarkerDate;
} | java | private List<Date> getListOfMarkerDateBetWeenTwoDates(final Date startDate, final Date endDate) {
final List<Date> listOfMarkerDate = new LinkedList<>();
final Calendar startDateAsCal = toGregorianCalendar(startDate);
final Calendar endDateAsCal = toGregorianCalendar(endDate);
while (startDateAsCal.before(endDateAsCal)) {
listOfMarkerDate.add(getMarkerDateOfMonth(startDateAsCal.getTime()));
startDateAsCal.add(Calendar.MONTH, 1);
}
return listOfMarkerDate;
} | [
"private",
"List",
"<",
"Date",
">",
"getListOfMarkerDateBetWeenTwoDates",
"(",
"final",
"Date",
"startDate",
",",
"final",
"Date",
"endDate",
")",
"{",
"final",
"List",
"<",
"Date",
">",
"listOfMarkerDate",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"fi... | Return the list of all potential marker date between two dates.
@param startDate
@param endDate
@return | [
"Return",
"the",
"list",
"of",
"all",
"potential",
"marker",
"date",
"between",
"two",
"dates",
"."
] | 7b6a4388065adfd84655dbc83f37080874953b20 | https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java#L213-L226 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/events/service/EventService.java | EventService.dispatchEvent | public EventHandlerStatus dispatchEvent(HttpServletRequest httpRequest) {
ApiContext apiContext = new MozuApiContext(httpRequest);
Event event = null;
// get the event from the request and validate
try {
String body = IOUtils.toString(httpRequest.getInputStream());
logger.debug("Event body: " + body);
event = mapper.readValue(body, Event.class);
logger.info("Dispatching Event. Correlation ID: " + event.getCorrelationId());
if (!Crypto.isRequestValid(apiContext, body)) {
StringBuilder msg = new StringBuilder ("Event is not authorized.");
logger.warn(msg.toString());
return( new EventHandlerStatus(msg.toString(), HttpServletResponse.SC_UNAUTHORIZED));
}
} catch (IOException exception) {
StringBuilder msg = new StringBuilder ("Unable to read event: ").append(exception.getMessage());
logger.error(msg.toString());
return( new EventHandlerStatus(msg.toString(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
}
try {
invokeHandler(event, apiContext);
} catch (Exception exception) {
StringBuilder msg = new StringBuilder ("Unable to process event with correlation id ").append(event.getCorrelationId()).append(". Message: ").append(exception.getMessage());
logger.error(msg.toString());
return( new EventHandlerStatus(msg.toString(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
}
return( new EventHandlerStatus(null, HttpServletResponse.SC_OK));
} | java | public EventHandlerStatus dispatchEvent(HttpServletRequest httpRequest) {
ApiContext apiContext = new MozuApiContext(httpRequest);
Event event = null;
// get the event from the request and validate
try {
String body = IOUtils.toString(httpRequest.getInputStream());
logger.debug("Event body: " + body);
event = mapper.readValue(body, Event.class);
logger.info("Dispatching Event. Correlation ID: " + event.getCorrelationId());
if (!Crypto.isRequestValid(apiContext, body)) {
StringBuilder msg = new StringBuilder ("Event is not authorized.");
logger.warn(msg.toString());
return( new EventHandlerStatus(msg.toString(), HttpServletResponse.SC_UNAUTHORIZED));
}
} catch (IOException exception) {
StringBuilder msg = new StringBuilder ("Unable to read event: ").append(exception.getMessage());
logger.error(msg.toString());
return( new EventHandlerStatus(msg.toString(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
}
try {
invokeHandler(event, apiContext);
} catch (Exception exception) {
StringBuilder msg = new StringBuilder ("Unable to process event with correlation id ").append(event.getCorrelationId()).append(". Message: ").append(exception.getMessage());
logger.error(msg.toString());
return( new EventHandlerStatus(msg.toString(), HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
}
return( new EventHandlerStatus(null, HttpServletResponse.SC_OK));
} | [
"public",
"EventHandlerStatus",
"dispatchEvent",
"(",
"HttpServletRequest",
"httpRequest",
")",
"{",
"ApiContext",
"apiContext",
"=",
"new",
"MozuApiContext",
"(",
"httpRequest",
")",
";",
"Event",
"event",
"=",
"null",
";",
"// get the event from the request and validate... | Takes the event notification message, parses it and dispatches the event
to the registered handler for the event category and type.
@param httpRequest The http request containing the event notification message
@return A response with a status code and optionally an error message | [
"Takes",
"the",
"event",
"notification",
"message",
"parses",
"it",
"and",
"dispatches",
"the",
"event",
"to",
"the",
"registered",
"handler",
"for",
"the",
"event",
"category",
"and",
"type",
"."
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/events/service/EventService.java#L34-L63 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/events/service/EventService.java | EventService.invokeHandler | protected void invokeHandler(Event event, ApiContext apiContext)
throws ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException, InstantiationException
{
String topic[] = event.getTopic().split("\\.");
String eventCategory = topic[0].substring(0, 1).toUpperCase() + topic[0].substring(1);
String eventAction = topic[1];
// get list of registered handlers
Object handler = EventManager.getInstance().getRegisteredClassHandlers(eventCategory);
if (handler !=null) {
String methodName = eventAction;
String className = handler.getClass().getName();
try {
Method m;
m = handler.getClass().getMethod(methodName, ApiContext.class, Event.class);
m.invoke(handler, apiContext, event);
} catch (NoSuchMethodException e) {
logger.warn("No " + eventAction + " method on class " + className);
throw e;
} catch (SecurityException e) {
logger.warn("Security exception: " + e.getMessage());
throw e;
} catch (IllegalAccessException e) {
logger.warn("Illegal access for method " + eventAction + " on class " + className);
throw e;
} catch (IllegalArgumentException e) {
logger.warn("Illegal argument exception for method " + eventAction + " on class " + className);
throw e;
} catch (InvocationTargetException e) {
logger.warn("Invocation target exception for method " + eventAction + " on class " + className);
throw e;
}
}
} | java | protected void invokeHandler(Event event, ApiContext apiContext)
throws ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException, InstantiationException
{
String topic[] = event.getTopic().split("\\.");
String eventCategory = topic[0].substring(0, 1).toUpperCase() + topic[0].substring(1);
String eventAction = topic[1];
// get list of registered handlers
Object handler = EventManager.getInstance().getRegisteredClassHandlers(eventCategory);
if (handler !=null) {
String methodName = eventAction;
String className = handler.getClass().getName();
try {
Method m;
m = handler.getClass().getMethod(methodName, ApiContext.class, Event.class);
m.invoke(handler, apiContext, event);
} catch (NoSuchMethodException e) {
logger.warn("No " + eventAction + " method on class " + className);
throw e;
} catch (SecurityException e) {
logger.warn("Security exception: " + e.getMessage());
throw e;
} catch (IllegalAccessException e) {
logger.warn("Illegal access for method " + eventAction + " on class " + className);
throw e;
} catch (IllegalArgumentException e) {
logger.warn("Illegal argument exception for method " + eventAction + " on class " + className);
throw e;
} catch (InvocationTargetException e) {
logger.warn("Invocation target exception for method " + eventAction + " on class " + className);
throw e;
}
}
} | [
"protected",
"void",
"invokeHandler",
"(",
"Event",
"event",
",",
"ApiContext",
"apiContext",
")",
"throws",
"ClassNotFoundException",
",",
"NoSuchMethodException",
",",
"SecurityException",
",",
"IllegalAccessException",
",",
"IllegalArgumentException",
",",
"InvocationTar... | Dispatch the event to the handler registered for the category. The method
corresponding to the event type is invoked.
@param event The event object
@param apiContext The application context
@throws ClassNotFoundException
@throws SecurityException
@throws NoSuchMethodException
@throws InstantiationException
@throws InvocationTargetException
@throws IllegalArgumentException
@throws IllegalAccessException | [
"Dispatch",
"the",
"event",
"to",
"the",
"handler",
"registered",
"for",
"the",
"category",
".",
"The",
"method",
"corresponding",
"to",
"the",
"event",
"type",
"is",
"invoked",
"."
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/events/service/EventService.java#L79-L113 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/CompleteLattice.java | CompleteLattice.supremum | protected final Vertex supremum(final E proposed, Vertex generator) {
boolean max = true;
while (max) {
max = false;
for (Edge edge : generator.getEdges(Direction.BOTH)) {
Vertex target = edge.getVertex(Direction.OUT);
if (filter(target, generator)) {
continue;
}
//Concept proposed = new Concept(new MutableBitSet(), proposed.intent);
if (filter(target, proposed)) {
generator = target;
max = true;
break;
}
}
}
return generator;
} | java | protected final Vertex supremum(final E proposed, Vertex generator) {
boolean max = true;
while (max) {
max = false;
for (Edge edge : generator.getEdges(Direction.BOTH)) {
Vertex target = edge.getVertex(Direction.OUT);
if (filter(target, generator)) {
continue;
}
//Concept proposed = new Concept(new MutableBitSet(), proposed.intent);
if (filter(target, proposed)) {
generator = target;
max = true;
break;
}
}
}
return generator;
} | [
"protected",
"final",
"Vertex",
"supremum",
"(",
"final",
"E",
"proposed",
",",
"Vertex",
"generator",
")",
"{",
"boolean",
"max",
"=",
"true",
";",
"while",
"(",
"max",
")",
"{",
"max",
"=",
"false",
";",
"for",
"(",
"Edge",
"edge",
":",
"generator",
... | Find the supremum or least upper bound.
@param proposed element
@param generator element
@return supremum vertex | [
"Find",
"the",
"supremum",
"or",
"least",
"upper",
"bound",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/CompleteLattice.java#L124-L144 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/CompleteLattice.java | CompleteLattice.containsAll | @Override
public final boolean containsAll(final Collection<? extends E> collection) {
for(E element : collection) {
if(!this.contains(element)) {
return false;
}
}
return true;
} | java | @Override
public final boolean containsAll(final Collection<? extends E> collection) {
for(E element : collection) {
if(!this.contains(element)) {
return false;
}
}
return true;
} | [
"@",
"Override",
"public",
"final",
"boolean",
"containsAll",
"(",
"final",
"Collection",
"<",
"?",
"extends",
"E",
">",
"collection",
")",
"{",
"for",
"(",
"E",
"element",
":",
"collection",
")",
"{",
"if",
"(",
"!",
"this",
".",
"contains",
"(",
"ele... | Test if the lattice contains all elements of the given collection.
@param collection of elements
@return true if lattice contains all elements of the given collection | [
"Test",
"if",
"the",
"lattice",
"contains",
"all",
"elements",
"of",
"the",
"given",
"collection",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/CompleteLattice.java#L161-L169 | train |
nmdp-bioinformatics/ngs | fca/src/main/java/org/nmdp/ngs/fca/CompleteLattice.java | CompleteLattice.addIntent | protected final Vertex addIntent(final E proposed, Vertex generator) {
generator = supremum(proposed, generator);
if (filter(generator, proposed) && filter(proposed, generator)) {
return generator;
}
List parents = new ArrayList<>();
for (Edge edge : generator.getEdges(Direction.BOTH)) {
Vertex target = edge.getVertex(Direction.OUT);
if (filter(target, generator)) {
continue;
}
Vertex candidate = target;
if (!filter(target, proposed) && !filter(proposed, target)) {
E targetElement = target.getProperty(LABEL);
E intersect = (E) targetElement.intersect(proposed);
candidate = addIntent(intersect, candidate);
}
boolean add = true;
List doomed = new ArrayList<>();
for (java.util.Iterator it = parents.iterator(); it.hasNext();) {
Vertex parent = (Vertex) it.next();
if (filter(parent, candidate)) {
add = false;
break;
}
else if (filter(candidate, parent)) {
doomed.add(parent);
}
}
for (java.util.Iterator it = doomed.iterator(); it.hasNext();) {
Vertex vertex = (Vertex) it.next();
parents.remove(vertex);
}
if (add) {
parents.add(candidate);
}
}
E generatorLabel = generator.getProperty(LABEL);
Vertex child = insert((E) proposed.union(generatorLabel));
addUndirectedEdge(generator, child, "");
bottom = filter(bottom, proposed) ? child : bottom;
for (java.util.Iterator it = parents.iterator(); it.hasNext();) {
Vertex parent = (Vertex) it.next();
if (!parent.equals(generator)) {
removeUndirectedEdge(parent, generator);
addUndirectedEdge(parent, child, "");
}
}
return child;
} | java | protected final Vertex addIntent(final E proposed, Vertex generator) {
generator = supremum(proposed, generator);
if (filter(generator, proposed) && filter(proposed, generator)) {
return generator;
}
List parents = new ArrayList<>();
for (Edge edge : generator.getEdges(Direction.BOTH)) {
Vertex target = edge.getVertex(Direction.OUT);
if (filter(target, generator)) {
continue;
}
Vertex candidate = target;
if (!filter(target, proposed) && !filter(proposed, target)) {
E targetElement = target.getProperty(LABEL);
E intersect = (E) targetElement.intersect(proposed);
candidate = addIntent(intersect, candidate);
}
boolean add = true;
List doomed = new ArrayList<>();
for (java.util.Iterator it = parents.iterator(); it.hasNext();) {
Vertex parent = (Vertex) it.next();
if (filter(parent, candidate)) {
add = false;
break;
}
else if (filter(candidate, parent)) {
doomed.add(parent);
}
}
for (java.util.Iterator it = doomed.iterator(); it.hasNext();) {
Vertex vertex = (Vertex) it.next();
parents.remove(vertex);
}
if (add) {
parents.add(candidate);
}
}
E generatorLabel = generator.getProperty(LABEL);
Vertex child = insert((E) proposed.union(generatorLabel));
addUndirectedEdge(generator, child, "");
bottom = filter(bottom, proposed) ? child : bottom;
for (java.util.Iterator it = parents.iterator(); it.hasNext();) {
Vertex parent = (Vertex) it.next();
if (!parent.equals(generator)) {
removeUndirectedEdge(parent, generator);
addUndirectedEdge(parent, child, "");
}
}
return child;
} | [
"protected",
"final",
"Vertex",
"addIntent",
"(",
"final",
"E",
"proposed",
",",
"Vertex",
"generator",
")",
"{",
"generator",
"=",
"supremum",
"(",
"proposed",
",",
"generator",
")",
";",
"if",
"(",
"filter",
"(",
"generator",
",",
"proposed",
")",
"&&",
... | Add a new element dynamically to the lattice.
@param proposed element
@param generator vertex
@return new added vertex or generator if the proposed element already
exists | [
"Add",
"a",
"new",
"element",
"dynamically",
"to",
"the",
"lattice",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/fca/src/main/java/org/nmdp/ngs/fca/CompleteLattice.java#L230-L290 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderAttributeUrl.java | OrderAttributeUrl.updateOrderAttributesUrl | public static MozuUrl updateOrderAttributesUrl(String orderId, Boolean removeMissing)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/attributes?removeMissing={removeMissing}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("removeMissing", removeMissing);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateOrderAttributesUrl(String orderId, Boolean removeMissing)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/attributes?removeMissing={removeMissing}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("removeMissing", removeMissing);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateOrderAttributesUrl",
"(",
"String",
"orderId",
",",
"Boolean",
"removeMissing",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}/attributes?removeMissing={removeMissing}\"",
")",
";... | Get Resource Url for UpdateOrderAttributes
@param orderId Unique identifier of the order.
@param removeMissing If true, the operation removes missing properties so that the updated order attributes will not show properties with a null value.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateOrderAttributes"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderAttributeUrl.java#L46-L52 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicCardUrl.java | PublicCardUrl.updateUrl | public static MozuUrl updateUrl(String cardId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/payments/commerce/payments/cards/{cardId}?responseFields={responseFields}");
formatter.formatUrl("cardId", cardId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.PCI_POD) ;
} | java | public static MozuUrl updateUrl(String cardId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/payments/commerce/payments/cards/{cardId}?responseFields={responseFields}");
formatter.formatUrl("cardId", cardId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.PCI_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateUrl",
"(",
"String",
"cardId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/payments/commerce/payments/cards/{cardId}?responseFields={responseFields}\"",
")",
";",
"formatt... | Get Resource Url for Update
@param cardId Unique identifier of the card associated with the customer account billing contact.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"Update"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicCardUrl.java#L60-L66 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicCardUrl.java | PublicCardUrl.deleteUrl | public static MozuUrl deleteUrl(String cardId)
{
UrlFormatter formatter = new UrlFormatter("/payments/commerce/payments/cards/{cardId}");
formatter.formatUrl("cardId", cardId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.PCI_POD) ;
} | java | public static MozuUrl deleteUrl(String cardId)
{
UrlFormatter formatter = new UrlFormatter("/payments/commerce/payments/cards/{cardId}");
formatter.formatUrl("cardId", cardId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.PCI_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteUrl",
"(",
"String",
"cardId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/payments/commerce/payments/cards/{cardId}\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"cardId\"",
",",
"cardId",
... | Get Resource Url for Delete
@param cardId Unique identifier of the card associated with the customer account billing contact.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"Delete"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicCardUrl.java#L73-L78 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/content/PropertyTypeUrl.java | PropertyTypeUrl.getPropertyTypesUrl | public static MozuUrl getPropertyTypesUrl(Integer pageSize, String responseFields, Integer startIndex)
{
UrlFormatter formatter = new UrlFormatter("/api/content/propertytypes/?pageSize={pageSize}&startIndex={startIndex}&responseFields={responseFields}");
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("startIndex", startIndex);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getPropertyTypesUrl(Integer pageSize, String responseFields, Integer startIndex)
{
UrlFormatter formatter = new UrlFormatter("/api/content/propertytypes/?pageSize={pageSize}&startIndex={startIndex}&responseFields={responseFields}");
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("startIndex", startIndex);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getPropertyTypesUrl",
"(",
"Integer",
"pageSize",
",",
"String",
"responseFields",
",",
"Integer",
"startIndex",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/content/propertytypes/?pageSize={pageSize}&startI... | Get Resource Url for GetPropertyTypes
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetPropertyTypes"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/PropertyTypeUrl.java#L23-L30 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/content/PropertyTypeUrl.java | PropertyTypeUrl.getPropertyTypeUrl | public static MozuUrl getPropertyTypeUrl(String propertyTypeName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/content/propertytypes/{propertyTypeName}?responseFields={responseFields}");
formatter.formatUrl("propertyTypeName", propertyTypeName);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getPropertyTypeUrl(String propertyTypeName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/content/propertytypes/{propertyTypeName}?responseFields={responseFields}");
formatter.formatUrl("propertyTypeName", propertyTypeName);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getPropertyTypeUrl",
"(",
"String",
"propertyTypeName",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/content/propertytypes/{propertyTypeName}?responseFields={responseFields}\"",
... | Get Resource Url for GetPropertyType
@param propertyTypeName The name of the property type.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetPropertyType"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/PropertyTypeUrl.java#L38-L44 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/content/PropertyTypeUrl.java | PropertyTypeUrl.deletePropertyTypeUrl | public static MozuUrl deletePropertyTypeUrl(String propertyTypeName)
{
UrlFormatter formatter = new UrlFormatter("/api/content/propertytypes/{propertyTypeName}");
formatter.formatUrl("propertyTypeName", propertyTypeName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deletePropertyTypeUrl(String propertyTypeName)
{
UrlFormatter formatter = new UrlFormatter("/api/content/propertytypes/{propertyTypeName}");
formatter.formatUrl("propertyTypeName", propertyTypeName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deletePropertyTypeUrl",
"(",
"String",
"propertyTypeName",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/content/propertytypes/{propertyTypeName}\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"propert... | Get Resource Url for DeletePropertyType
@param propertyTypeName The name of the property type.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeletePropertyType"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/PropertyTypeUrl.java#L77-L82 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/extensions/CredentialStoreEntryUrl.java | CredentialStoreEntryUrl.storeCredentialsUrl | public static MozuUrl storeCredentialsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/platform/extensions/credentialStore/");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl storeCredentialsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/platform/extensions/credentialStore/");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"storeCredentialsUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/extensions/credentialStore/\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
"(",
")",... | Get Resource Url for StoreCredentials
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"StoreCredentials"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/extensions/CredentialStoreEntryUrl.java#L20-L24 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/quotes/OrderItemUrl.java | OrderItemUrl.getQuoteItemsByQuoteNameUrl | public static MozuUrl getQuoteItemsByQuoteNameUrl(Integer customerAccountId, String filter, Integer pageSize, String quoteName, String responseFields, String sortBy, Integer startIndex)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/customers/{customerAccountId}/{quoteName}/items?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
formatter.formatUrl("filter", filter);
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("quoteName", quoteName);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("sortBy", sortBy);
formatter.formatUrl("startIndex", startIndex);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getQuoteItemsByQuoteNameUrl(Integer customerAccountId, String filter, Integer pageSize, String quoteName, String responseFields, String sortBy, Integer startIndex)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/customers/{customerAccountId}/{quoteName}/items?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
formatter.formatUrl("filter", filter);
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("quoteName", quoteName);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("sortBy", sortBy);
formatter.formatUrl("startIndex", startIndex);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getQuoteItemsByQuoteNameUrl",
"(",
"Integer",
"customerAccountId",
",",
"String",
"filter",
",",
"Integer",
"pageSize",
",",
"String",
"quoteName",
",",
"String",
"responseFields",
",",
"String",
"sortBy",
",",
"Integer",
"startIndex",
... | Get Resource Url for GetQuoteItemsByQuoteName
@param customerAccountId The unique identifier of the customer account for which to retrieve wish lists.
@param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
@param quoteName
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.
@param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetQuoteItemsByQuoteName"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/quotes/OrderItemUrl.java#L65-L76 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/quotes/OrderItemUrl.java | OrderItemUrl.addItemToQuoteUrl | public static MozuUrl addItemToQuoteUrl(String quoteId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}/items?responseFields={responseFields}");
formatter.formatUrl("quoteId", quoteId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl addItemToQuoteUrl(String quoteId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}/items?responseFields={responseFields}");
formatter.formatUrl("quoteId", quoteId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"addItemToQuoteUrl",
"(",
"String",
"quoteId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/quotes/{quoteId}/items?responseFields={responseFields}\"",
")",
";",
"form... | Get Resource Url for AddItemToQuote
@param quoteId
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"AddItemToQuote"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/quotes/OrderItemUrl.java#L84-L90 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/quotes/OrderItemUrl.java | OrderItemUrl.updateQuoteItemUrl | public static MozuUrl updateQuoteItemUrl(String quoteId, String quoteItemId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}/items/{quoteItemId}?responseFields={responseFields}");
formatter.formatUrl("quoteId", quoteId);
formatter.formatUrl("quoteItemId", quoteItemId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateQuoteItemUrl(String quoteId, String quoteItemId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}/items/{quoteItemId}?responseFields={responseFields}");
formatter.formatUrl("quoteId", quoteId);
formatter.formatUrl("quoteItemId", quoteItemId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateQuoteItemUrl",
"(",
"String",
"quoteId",
",",
"String",
"quoteItemId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/quotes/{quoteId}/items/{quoteItemId}?respon... | Get Resource Url for UpdateQuoteItem
@param quoteId
@param quoteItemId
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateQuoteItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/quotes/OrderItemUrl.java#L99-L106 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/quotes/OrderItemUrl.java | OrderItemUrl.deleteQuoteItemUrl | public static MozuUrl deleteQuoteItemUrl(String quoteId, String quoteItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}/items/{quoteItemId}");
formatter.formatUrl("quoteId", quoteId);
formatter.formatUrl("quoteItemId", quoteItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteQuoteItemUrl(String quoteId, String quoteItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}/items/{quoteItemId}");
formatter.formatUrl("quoteId", quoteId);
formatter.formatUrl("quoteItemId", quoteItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteQuoteItemUrl",
"(",
"String",
"quoteId",
",",
"String",
"quoteItemId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/quotes/{quoteId}/items/{quoteItemId}\"",
")",
";",
"formatter",
".",
"fo... | Get Resource Url for DeleteQuoteItem
@param quoteId
@param quoteItemId
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteQuoteItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/quotes/OrderItemUrl.java#L114-L120 | train |
spotify/ssh-agent-proxy | src/main/java/com/spotify/sshagentproxy/AgentOutput.java | AgentOutput.signRequest | void signRequest(final RSAPublicKey rsaPublicKey, final byte[] data) throws IOException {
// TODO (dxia) Support more than just Rsa keys
final String keyType = Rsa.RSA_LABEL;
final byte[] publicExponent = rsaPublicKey.getPublicExponent().toByteArray();
final byte[] modulus = rsaPublicKey.getModulus().toByteArray();
// Four bytes indicating length of string denoting key type
// Four bytes indicating length of public exponent
// Four bytes indicating length of modulus
final int publicKeyLength = 4 + keyType.length()
+ 4 + publicExponent.length
+ 4 + modulus.length;
// The message is made of:
// Four bytes indicating length in bytes of rest of message
// One byte indicating SSH2_AGENTC_SIGN_REQUEST
// Four bytes denoting length of public key
// Bytes representing the public key
// Four bytes for length of data
// Bytes representing data to be signed
// Four bytes of flags
final ByteBuffer buff = ByteBuffer.allocate(
INT_BYTES + 1 + INT_BYTES + publicKeyLength + INT_BYTES + data.length + 4);
// 13 =
// One byte indicating SSH2_AGENTC_SIGN_REQUEST
// Four bytes denoting length of public key
// Four bytes for length of data
// Four bytes of flags
buff.putInt(publicKeyLength + data.length + 13);
buff.put((byte) SSH2_AGENTC_SIGN_REQUEST);
// Add the public key
buff.putInt(publicKeyLength);
buff.putInt(keyType.length());
for (final byte b : keyType.getBytes()) {
buff.put(b);
}
buff.putInt(publicExponent.length);
buff.put(publicExponent);
buff.putInt(modulus.length);
buff.put(modulus);
// Add the data to be signed
buff.putInt(data.length);
buff.put(data);
// Add empty flags
buff.put(new byte[] {0, 0, 0, 0});
out.write(buff.array());
out.flush();
log.debug("Sent SSH2_AGENTC_SIGN_REQUEST message to ssh-agent.");
} | java | void signRequest(final RSAPublicKey rsaPublicKey, final byte[] data) throws IOException {
// TODO (dxia) Support more than just Rsa keys
final String keyType = Rsa.RSA_LABEL;
final byte[] publicExponent = rsaPublicKey.getPublicExponent().toByteArray();
final byte[] modulus = rsaPublicKey.getModulus().toByteArray();
// Four bytes indicating length of string denoting key type
// Four bytes indicating length of public exponent
// Four bytes indicating length of modulus
final int publicKeyLength = 4 + keyType.length()
+ 4 + publicExponent.length
+ 4 + modulus.length;
// The message is made of:
// Four bytes indicating length in bytes of rest of message
// One byte indicating SSH2_AGENTC_SIGN_REQUEST
// Four bytes denoting length of public key
// Bytes representing the public key
// Four bytes for length of data
// Bytes representing data to be signed
// Four bytes of flags
final ByteBuffer buff = ByteBuffer.allocate(
INT_BYTES + 1 + INT_BYTES + publicKeyLength + INT_BYTES + data.length + 4);
// 13 =
// One byte indicating SSH2_AGENTC_SIGN_REQUEST
// Four bytes denoting length of public key
// Four bytes for length of data
// Four bytes of flags
buff.putInt(publicKeyLength + data.length + 13);
buff.put((byte) SSH2_AGENTC_SIGN_REQUEST);
// Add the public key
buff.putInt(publicKeyLength);
buff.putInt(keyType.length());
for (final byte b : keyType.getBytes()) {
buff.put(b);
}
buff.putInt(publicExponent.length);
buff.put(publicExponent);
buff.putInt(modulus.length);
buff.put(modulus);
// Add the data to be signed
buff.putInt(data.length);
buff.put(data);
// Add empty flags
buff.put(new byte[] {0, 0, 0, 0});
out.write(buff.array());
out.flush();
log.debug("Sent SSH2_AGENTC_SIGN_REQUEST message to ssh-agent.");
} | [
"void",
"signRequest",
"(",
"final",
"RSAPublicKey",
"rsaPublicKey",
",",
"final",
"byte",
"[",
"]",
"data",
")",
"throws",
"IOException",
"{",
"// TODO (dxia) Support more than just Rsa keys",
"final",
"String",
"keyType",
"=",
"Rsa",
".",
"RSA_LABEL",
";",
"final"... | Send a SSH2_AGENTC_SIGN_REQUEST message to ssh-agent.
@param rsaPublicKey The {@link RSAPublicKey} that tells ssh-agent which private key to use to
sign the data.
@param data The data in bytes to be signed. | [
"Send",
"a",
"SSH2_AGENTC_SIGN_REQUEST",
"message",
"to",
"ssh",
"-",
"agent",
"."
] | b678792750c0157bd5ed3fb6a18895ff95effbc4 | https://github.com/spotify/ssh-agent-proxy/blob/b678792750c0157bd5ed3fb6a18895ff95effbc4/src/main/java/com/spotify/sshagentproxy/AgentOutput.java#L113-L167 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/checkouts/OrderItemUrl.java | OrderItemUrl.splitItemUrl | public static MozuUrl splitItemUrl(String checkoutId, String itemId, Integer quantity, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/items/{itemId}/split?quantity={quantity}&responseFields={responseFields}");
formatter.formatUrl("checkoutId", checkoutId);
formatter.formatUrl("itemId", itemId);
formatter.formatUrl("quantity", quantity);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl splitItemUrl(String checkoutId, String itemId, Integer quantity, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/items/{itemId}/split?quantity={quantity}&responseFields={responseFields}");
formatter.formatUrl("checkoutId", checkoutId);
formatter.formatUrl("itemId", itemId);
formatter.formatUrl("quantity", quantity);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"splitItemUrl",
"(",
"String",
"checkoutId",
",",
"String",
"itemId",
",",
"Integer",
"quantity",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/checkouts/{checko... | Get Resource Url for SplitItem
@param checkoutId The unique identifier of the checkout.
@param itemId The unique identifier of the item.
@param quantity The number of cart items in the shopper's active cart.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"SplitItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/checkouts/OrderItemUrl.java#L24-L32 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/checkouts/OrderItemUrl.java | OrderItemUrl.updateItemDestinationUrl | public static MozuUrl updateItemDestinationUrl(String checkoutId, String destinationId, String itemId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/items/{itemId}/destination/{destinationId}?responseFields={responseFields}");
formatter.formatUrl("checkoutId", checkoutId);
formatter.formatUrl("destinationId", destinationId);
formatter.formatUrl("itemId", itemId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateItemDestinationUrl(String checkoutId, String destinationId, String itemId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/items/{itemId}/destination/{destinationId}?responseFields={responseFields}");
formatter.formatUrl("checkoutId", checkoutId);
formatter.formatUrl("destinationId", destinationId);
formatter.formatUrl("itemId", itemId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateItemDestinationUrl",
"(",
"String",
"checkoutId",
",",
"String",
"destinationId",
",",
"String",
"itemId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/c... | Get Resource Url for UpdateItemDestination
@param checkoutId The unique identifier of the checkout.
@param destinationId The unique identifier of the destination.
@param itemId The unique identifier of the item.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateItemDestination"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/checkouts/OrderItemUrl.java#L70-L78 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/checkouts/OrderItemUrl.java | OrderItemUrl.deleteCheckoutItemUrl | public static MozuUrl deleteCheckoutItemUrl(String checkoutId, String itemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/items/{itemId}");
formatter.formatUrl("checkoutId", checkoutId);
formatter.formatUrl("itemId", itemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteCheckoutItemUrl(String checkoutId, String itemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/items/{itemId}");
formatter.formatUrl("checkoutId", checkoutId);
formatter.formatUrl("itemId", itemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteCheckoutItemUrl",
"(",
"String",
"checkoutId",
",",
"String",
"itemId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/checkouts/{checkoutId}/items/{itemId}\"",
")",
";",
"formatter",
".",
"... | Get Resource Url for DeleteCheckoutItem
@param checkoutId The unique identifier of the checkout.
@param itemId The unique identifier of the item.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteCheckoutItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/checkouts/OrderItemUrl.java#L86-L92 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java | ListViewUrl.getViewEntityContainerUrl | public static MozuUrl getViewEntityContainerUrl(String entityId, String entityListFullName, String responseFields, String viewName)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}/entityContainers/{entityId}?responseFields={responseFields}");
formatter.formatUrl("entityId", entityId);
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("viewName", viewName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getViewEntityContainerUrl(String entityId, String entityListFullName, String responseFields, String viewName)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}/entityContainers/{entityId}?responseFields={responseFields}");
formatter.formatUrl("entityId", entityId);
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("viewName", viewName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getViewEntityContainerUrl",
"(",
"String",
"entityId",
",",
"String",
"entityListFullName",
",",
"String",
"responseFields",
",",
"String",
"viewName",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/plat... | Get Resource Url for GetViewEntityContainer
@param entityId Unique identifier for an entity, which defines the schema, rules, and formats for JSON entities within the MZDB ( Mongo DB).
@param entityListFullName The full name of the EntityList including namespace in name@nameSpace format
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param viewName The name for a view. Views are used to render data in , such as document and entity lists. Each view includes a schema, format, name, ID, and associated data types to render.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetViewEntityContainer"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java#L64-L72 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java | ListViewUrl.getViewEntityContainersUrl | public static MozuUrl getViewEntityContainersUrl(String entityListFullName, String filter, Integer pageSize, String responseFields, Integer startIndex, String viewName)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}/entityContainers?pageSize={pageSize}&startIndex={startIndex}&filter={filter}&responseFields={responseFields}");
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("filter", filter);
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("startIndex", startIndex);
formatter.formatUrl("viewName", viewName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getViewEntityContainersUrl(String entityListFullName, String filter, Integer pageSize, String responseFields, Integer startIndex, String viewName)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}/entityContainers?pageSize={pageSize}&startIndex={startIndex}&filter={filter}&responseFields={responseFields}");
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("filter", filter);
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("startIndex", startIndex);
formatter.formatUrl("viewName", viewName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getViewEntityContainersUrl",
"(",
"String",
"entityListFullName",
",",
"String",
"filter",
",",
"Integer",
"pageSize",
",",
"String",
"responseFields",
",",
"Integer",
"startIndex",
",",
"String",
"viewName",
")",
"{",
"UrlFormatter",
... | Get Resource Url for GetViewEntityContainers
@param entityListFullName The full name of the EntityList including namespace in name@nameSpace format
@param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
@param viewName The name for a view. Views are used to render data in , such as document and entity lists. Each view includes a schema, format, name, ID, and associated data types to render.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetViewEntityContainers"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java#L84-L94 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java | ListViewUrl.getEntityListViewUrl | public static MozuUrl getEntityListViewUrl(String entityListFullName, String responseFields, String viewName)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}?responseFields={responseFields}");
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("viewName", viewName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getEntityListViewUrl(String entityListFullName, String responseFields, String viewName)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}?responseFields={responseFields}");
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("viewName", viewName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getEntityListViewUrl",
"(",
"String",
"entityListFullName",
",",
"String",
"responseFields",
",",
"String",
"viewName",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/entitylists/{entityListFullName}/... | Get Resource Url for GetEntityListView
@param entityListFullName The full name of the EntityList including namespace in name@nameSpace format
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param viewName The name for a view. Views are used to render data in , such as document and entity lists. Each view includes a schema, format, name, ID, and associated data types to render.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetEntityListView"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java#L103-L110 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java | ListViewUrl.getEntityListViewsUrl | public static MozuUrl getEntityListViewsUrl(String entityListFullName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views?responseFields={responseFields}");
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getEntityListViewsUrl(String entityListFullName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views?responseFields={responseFields}");
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getEntityListViewsUrl",
"(",
"String",
"entityListFullName",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/entitylists/{entityListFullName}/views?responseFields={responseFi... | Get Resource Url for GetEntityListViews
@param entityListFullName The full name of the EntityList including namespace in name@nameSpace format
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetEntityListViews"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java#L118-L124 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java | ListViewUrl.deleteEntityListViewUrl | public static MozuUrl deleteEntityListViewUrl(String entityListFullName, String viewName)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}");
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("viewName", viewName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteEntityListViewUrl(String entityListFullName, String viewName)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}");
formatter.formatUrl("entityListFullName", entityListFullName);
formatter.formatUrl("viewName", viewName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteEntityListViewUrl",
"(",
"String",
"entityListFullName",
",",
"String",
"viewName",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/entitylists/{entityListFullName}/views/{viewName}\"",
")",
";",
... | Get Resource Url for DeleteEntityListView
@param entityListFullName The full name of the EntityList including namespace in name@nameSpace format
@param viewName The name for a view. Views are used to render data in , such as document and entity lists. Each view includes a schema, format, name, ID, and associated data types to render.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteEntityListView"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java#L162-L168 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java | WishlistItemUrl.getWishlistItemUrl | public static MozuUrl getWishlistItemUrl(String responseFields, String wishlistId, String wishlistItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("wishlistId", wishlistId);
formatter.formatUrl("wishlistItemId", wishlistItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getWishlistItemUrl(String responseFields, String wishlistId, String wishlistItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("wishlistId", wishlistId);
formatter.formatUrl("wishlistItemId", wishlistItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getWishlistItemUrl",
"(",
"String",
"responseFields",
",",
"String",
"wishlistId",
",",
"String",
"wishlistItemId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/wishlists/{wishlistId}/items/{wishlis... | Get Resource Url for GetWishlistItem
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param wishlistId Unique identifier of the wish list.
@param wishlistItemId Unique identifier of the item to remove from the shopper wish list.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetWishlistItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java#L23-L30 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java | WishlistItemUrl.getWishlistItemsByWishlistNameUrl | public static MozuUrl getWishlistItemsByWishlistNameUrl(Integer customerAccountId, String filter, Integer pageSize, String responseFields, String sortBy, Integer startIndex, String wishlistName)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/customers/{customerAccountId}/{wishlistName}/items?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
formatter.formatUrl("filter", filter);
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("sortBy", sortBy);
formatter.formatUrl("startIndex", startIndex);
formatter.formatUrl("wishlistName", wishlistName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getWishlistItemsByWishlistNameUrl(Integer customerAccountId, String filter, Integer pageSize, String responseFields, String sortBy, Integer startIndex, String wishlistName)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/customers/{customerAccountId}/{wishlistName}/items?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
formatter.formatUrl("filter", filter);
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("sortBy", sortBy);
formatter.formatUrl("startIndex", startIndex);
formatter.formatUrl("wishlistName", wishlistName);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getWishlistItemsByWishlistNameUrl",
"(",
"Integer",
"customerAccountId",
",",
"String",
"filter",
",",
"Integer",
"pageSize",
",",
"String",
"responseFields",
",",
"String",
"sortBy",
",",
"Integer",
"startIndex",
",",
"String",
"wishli... | Get Resource Url for GetWishlistItemsByWishlistName
@param customerAccountId The unique identifier of the customer account for which to retrieve wish lists.
@param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.
@param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
@param wishlistName The name of the wish list to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetWishlistItemsByWishlistName"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java#L65-L76 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java | WishlistItemUrl.updateWishlistItemQuantityUrl | public static MozuUrl updateWishlistItemQuantityUrl(Integer quantity, String responseFields, String wishlistId, String wishlistItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}/{quantity}?responseFields={responseFields}");
formatter.formatUrl("quantity", quantity);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("wishlistId", wishlistId);
formatter.formatUrl("wishlistItemId", wishlistItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateWishlistItemQuantityUrl(Integer quantity, String responseFields, String wishlistId, String wishlistItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}/{quantity}?responseFields={responseFields}");
formatter.formatUrl("quantity", quantity);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("wishlistId", wishlistId);
formatter.formatUrl("wishlistItemId", wishlistItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateWishlistItemQuantityUrl",
"(",
"Integer",
"quantity",
",",
"String",
"responseFields",
",",
"String",
"wishlistId",
",",
"String",
"wishlistItemId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/c... | Get Resource Url for UpdateWishlistItemQuantity
@param quantity The number of cart items in the shopper's active cart.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param wishlistId Unique identifier of the wish list.
@param wishlistItemId Unique identifier of the item to remove from the shopper wish list.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateWishlistItemQuantity"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java#L100-L108 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java | WishlistItemUrl.removeAllWishlistItemsUrl | public static MozuUrl removeAllWishlistItemsUrl(String wishlistId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}/items");
formatter.formatUrl("wishlistId", wishlistId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl removeAllWishlistItemsUrl(String wishlistId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}/items");
formatter.formatUrl("wishlistId", wishlistId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"removeAllWishlistItemsUrl",
"(",
"String",
"wishlistId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/wishlists/{wishlistId}/items\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"wishlistId\"... | Get Resource Url for RemoveAllWishlistItems
@param wishlistId Unique identifier of the wish list.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RemoveAllWishlistItems"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java#L131-L136 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java | WishlistItemUrl.deleteWishlistItemUrl | public static MozuUrl deleteWishlistItemUrl(String wishlistId, String wishlistItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}");
formatter.formatUrl("wishlistId", wishlistId);
formatter.formatUrl("wishlistItemId", wishlistItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteWishlistItemUrl(String wishlistId, String wishlistItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}");
formatter.formatUrl("wishlistId", wishlistId);
formatter.formatUrl("wishlistItemId", wishlistItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteWishlistItemUrl",
"(",
"String",
"wishlistId",
",",
"String",
"wishlistItemId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/wishlists/{wishlistId}/items/{wishlistItemId}\"",
")",
";",
"format... | Get Resource Url for DeleteWishlistItem
@param wishlistId Unique identifier of the wish list.
@param wishlistItemId Unique identifier of the item to remove from the shopper wish list.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteWishlistItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/wishlists/WishlistItemUrl.java#L144-L150 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CreditUrl.java | CreditUrl.getCreditUrl | public static MozuUrl getCreditUrl(String code, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/credits/{code}?responseFields={responseFields}");
formatter.formatUrl("code", code);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getCreditUrl(String code, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/credits/{code}?responseFields={responseFields}");
formatter.formatUrl("code", code);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getCreditUrl",
"(",
"String",
"code",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/credits/{code}?responseFields={responseFields}\"",
")",
";",
"formatter",... | Get Resource Url for GetCredit
@param code User-defined code that uniqely identifies the channel group.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetCredit"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CreditUrl.java#L42-L48 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CreditUrl.java | CreditUrl.resendCreditCreatedEmailUrl | public static MozuUrl resendCreditCreatedEmailUrl(String code, String userId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/credits/{code}/Resend-Email?userId={userId}");
formatter.formatUrl("code", code);
formatter.formatUrl("userId", userId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl resendCreditCreatedEmailUrl(String code, String userId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/credits/{code}/Resend-Email?userId={userId}");
formatter.formatUrl("code", code);
formatter.formatUrl("userId", userId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"resendCreditCreatedEmailUrl",
"(",
"String",
"code",
",",
"String",
"userId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/credits/{code}/Resend-Email?userId={userId}\"",
")",
";",
"formatt... | Get Resource Url for ResendCreditCreatedEmail
@param code User-defined code that uniqely identifies the channel group.
@param userId Unique identifier of the user whose tenant scopes you want to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"ResendCreditCreatedEmail"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CreditUrl.java#L84-L90 | train |
mgm-tp/jfunk | jfunk-core/src/main/java/com/mgmtp/jfunk/core/JFunk.java | JFunk.main | public static void main(final String[] args) {
SLF4JBridgeHandler.install();
boolean exitWithError = true;
StopWatch stopWatch = new StopWatch();
try {
RESULT_LOG.info("jFunk started");
stopWatch.start();
int threadCount = 1;
boolean parallel = false;
Properties scriptProperties = new Properties();
List<File> scripts = Lists.newArrayList();
for (String arg : args) {
if (arg.startsWith("-threadcount")) {
String[] split = arg.split("=");
Preconditions.checkArgument(split.length == 2,
"The number of threads must be specified as follows: -threadcount=<value>");
threadCount = Integer.parseInt(split[1]);
RESULT_LOG.info("Using " + threadCount + (threadCount == 1 ? " thread" : " threads"));
} else if (arg.startsWith("-S")) {
arg = arg.substring(2);
String[] split = arg.split("=");
Preconditions
.checkArgument(split.length == 2, "Script parameters must be given in the form -S<name>=<value>");
scriptProperties.setProperty(split[0], normalizeScriptParameterValue(split[1]));
RESULT_LOG.info("Using script parameter " + split[0] + " with value " + split[1]);
} else if (arg.equals("-parallel")) {
parallel = true;
RESULT_LOG.info("Using parallel mode");
} else {
scripts.add(new File(arg));
}
}
if (scripts.isEmpty()) {
scripts.addAll(requestScriptsViaGui());
if (scripts.isEmpty()) {
RESULT_LOG.info("Execution finished (took " + stopWatch + " H:mm:ss.SSS)");
System.exit(0);
}
}
String propsFileName = System.getProperty("jfunk.props.file", "jfunk.properties");
Module module = ModulesLoader.loadModulesFromProperties(new JFunkDefaultModule(), propsFileName);
Injector injector = Guice.createInjector(module);
JFunkFactory factory = injector.getInstance(JFunkFactory.class);
JFunkBase jFunk = factory.create(threadCount, parallel, scripts, scriptProperties);
jFunk.execute();
exitWithError = false;
} catch (JFunkExecutionException ex) {
// no logging necessary
} catch (Exception ex) {
Logger.getLogger(JFunk.class).error("jFunk terminated unexpectedly.", ex);
} finally {
stopWatch.stop();
RESULT_LOG.info("Execution finished (took " + stopWatch + " H:mm:ss.SSS)");
}
System.exit(exitWithError ? -1 : 0);
} | java | public static void main(final String[] args) {
SLF4JBridgeHandler.install();
boolean exitWithError = true;
StopWatch stopWatch = new StopWatch();
try {
RESULT_LOG.info("jFunk started");
stopWatch.start();
int threadCount = 1;
boolean parallel = false;
Properties scriptProperties = new Properties();
List<File> scripts = Lists.newArrayList();
for (String arg : args) {
if (arg.startsWith("-threadcount")) {
String[] split = arg.split("=");
Preconditions.checkArgument(split.length == 2,
"The number of threads must be specified as follows: -threadcount=<value>");
threadCount = Integer.parseInt(split[1]);
RESULT_LOG.info("Using " + threadCount + (threadCount == 1 ? " thread" : " threads"));
} else if (arg.startsWith("-S")) {
arg = arg.substring(2);
String[] split = arg.split("=");
Preconditions
.checkArgument(split.length == 2, "Script parameters must be given in the form -S<name>=<value>");
scriptProperties.setProperty(split[0], normalizeScriptParameterValue(split[1]));
RESULT_LOG.info("Using script parameter " + split[0] + " with value " + split[1]);
} else if (arg.equals("-parallel")) {
parallel = true;
RESULT_LOG.info("Using parallel mode");
} else {
scripts.add(new File(arg));
}
}
if (scripts.isEmpty()) {
scripts.addAll(requestScriptsViaGui());
if (scripts.isEmpty()) {
RESULT_LOG.info("Execution finished (took " + stopWatch + " H:mm:ss.SSS)");
System.exit(0);
}
}
String propsFileName = System.getProperty("jfunk.props.file", "jfunk.properties");
Module module = ModulesLoader.loadModulesFromProperties(new JFunkDefaultModule(), propsFileName);
Injector injector = Guice.createInjector(module);
JFunkFactory factory = injector.getInstance(JFunkFactory.class);
JFunkBase jFunk = factory.create(threadCount, parallel, scripts, scriptProperties);
jFunk.execute();
exitWithError = false;
} catch (JFunkExecutionException ex) {
// no logging necessary
} catch (Exception ex) {
Logger.getLogger(JFunk.class).error("jFunk terminated unexpectedly.", ex);
} finally {
stopWatch.stop();
RESULT_LOG.info("Execution finished (took " + stopWatch + " H:mm:ss.SSS)");
}
System.exit(exitWithError ? -1 : 0);
} | [
"public",
"static",
"void",
"main",
"(",
"final",
"String",
"[",
"]",
"args",
")",
"{",
"SLF4JBridgeHandler",
".",
"install",
"(",
")",
";",
"boolean",
"exitWithError",
"=",
"true",
";",
"StopWatch",
"stopWatch",
"=",
"new",
"StopWatch",
"(",
")",
";",
"... | Starts jFunk.
<pre>
-threadcount=<count> Optional Number of threads to be used. Allows for parallel
execution of test scripts.
-parallel Optional Allows a single script to be executed in parallel
depending on the number of threads specified. The
argument is ignored if multiple scripts are specified.
<script parameters> Optional Similar to Java system properties they can be provided
as key-value-pairs preceded by -S, e.g. -Skey=value.
These parameters are then available in the script as
Groovy variables.
<script(s)> Required At least one test script must be specified.
Example:
java -cp <jFunkClasspath> com.mgmtp.jfunk.core.JFunk -Skey=value -threadcount=4 -parallel mytest.script
</pre>
@param args
The program arguments. | [
"Starts",
"jFunk",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/JFunk.java#L262-L327 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/XmlElementFinder.java | XmlElementFinder.findElementById | public Element findElementById(final Element element) {
Attribute a = element.getAttribute(idAttributeName);
if (a == null) {
return null;
}
return findElementById(a.getValue());
} | java | public Element findElementById(final Element element) {
Attribute a = element.getAttribute(idAttributeName);
if (a == null) {
return null;
}
return findElementById(a.getValue());
} | [
"public",
"Element",
"findElementById",
"(",
"final",
"Element",
"element",
")",
"{",
"Attribute",
"a",
"=",
"element",
".",
"getAttribute",
"(",
"idAttributeName",
")",
";",
"if",
"(",
"a",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"... | Searches the attribute id in the given element first and using this element searches for the
element with the attribute id and the value of this element.
@return the element with the id whose value is contained in the id attribute of the passed
element
@see #findElementById(String) | [
"Searches",
"the",
"attribute",
"id",
"in",
"the",
"given",
"element",
"first",
"and",
"using",
"this",
"element",
"searches",
"for",
"the",
"element",
"with",
"the",
"attribute",
"id",
"and",
"the",
"value",
"of",
"this",
"element",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/XmlElementFinder.java#L89-L95 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/XmlElementFinder.java | XmlElementFinder.findElementById | public Element findElementById(final String id) {
Element element = cache.get(id);
if (element == null) {
if (log.isDebugEnabled()) {
log.debug("Search for element with ID {}", id);
}
Element root = document.getRootElement();
element = search(root, elementName, idAttributeName, id);
if (element != null) {
cache.put(id, element);
}
}
return element;
} | java | public Element findElementById(final String id) {
Element element = cache.get(id);
if (element == null) {
if (log.isDebugEnabled()) {
log.debug("Search for element with ID {}", id);
}
Element root = document.getRootElement();
element = search(root, elementName, idAttributeName, id);
if (element != null) {
cache.put(id, element);
}
}
return element;
} | [
"public",
"Element",
"findElementById",
"(",
"final",
"String",
"id",
")",
"{",
"Element",
"element",
"=",
"cache",
".",
"get",
"(",
"id",
")",
";",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",... | Searches first in the cache for the given id. If it is found the element saved there will be
returned. If it is not found the search - starting at the RootElement- will continue until
the first element in the tree hierarchy is found which 1. has the attribute id and 2. whose
id attribute has the value of the parameter's id. Once found it will be saved in the cache.
@return the element with the respective id | [
"Searches",
"first",
"in",
"the",
"cache",
"for",
"the",
"given",
"id",
".",
"If",
"it",
"is",
"found",
"the",
"element",
"saved",
"there",
"will",
"be",
"returned",
".",
"If",
"it",
"is",
"not",
"found",
"the",
"search",
"-",
"starting",
"at",
"the",
... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/XmlElementFinder.java#L105-L118 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/XmlElementFinder.java | XmlElementFinder.search | public static Element search(final Element root, final String elementName, final String idAttributeName, final String id) {
Element element = null;
@SuppressWarnings("unchecked")
List<Element> children = root.getChildren();
for (Element e : children) {
if (elementName == null || e.getName().equals(elementName)) {
Attribute a = e.getAttribute(idAttributeName);
if (a != null && id.equals(a.getValue())) {
element = e;
} else {
element = search(e, elementName, idAttributeName, id);
}
}
if (element != null) {
break;
}
}
return element;
} | java | public static Element search(final Element root, final String elementName, final String idAttributeName, final String id) {
Element element = null;
@SuppressWarnings("unchecked")
List<Element> children = root.getChildren();
for (Element e : children) {
if (elementName == null || e.getName().equals(elementName)) {
Attribute a = e.getAttribute(idAttributeName);
if (a != null && id.equals(a.getValue())) {
element = e;
} else {
element = search(e, elementName, idAttributeName, id);
}
}
if (element != null) {
break;
}
}
return element;
} | [
"public",
"static",
"Element",
"search",
"(",
"final",
"Element",
"root",
",",
"final",
"String",
"elementName",
",",
"final",
"String",
"idAttributeName",
",",
"final",
"String",
"id",
")",
"{",
"Element",
"element",
"=",
"null",
";",
"@",
"SuppressWarnings",... | Searches the ElementBaum starting with the given element for the ChildElement with the
respective attribute value
@return the matching element | [
"Searches",
"the",
"ElementBaum",
"starting",
"with",
"the",
"given",
"element",
"for",
"the",
"ChildElement",
"with",
"the",
"respective",
"attribute",
"value"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/XmlElementFinder.java#L126-L144 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/XmlElementFinder.java | XmlElementFinder.getChild | public static Element getChild(final String name, final Element root) {
@SuppressWarnings("unchecked")
List<Element> allChildren = root.getChildren();
for (Element child : allChildren) {
if (child.getName().equals(name)) {
return child;
}
}
return null;
} | java | public static Element getChild(final String name, final Element root) {
@SuppressWarnings("unchecked")
List<Element> allChildren = root.getChildren();
for (Element child : allChildren) {
if (child.getName().equals(name)) {
return child;
}
}
return null;
} | [
"public",
"static",
"Element",
"getChild",
"(",
"final",
"String",
"name",
",",
"final",
"Element",
"root",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"List",
"<",
"Element",
">",
"allChildren",
"=",
"root",
".",
"getChildren",
"(",
")",
... | Searches for the Child with the given name ignoring namespaces
@return the Child with the name ignoring namespaces | [
"Searches",
"for",
"the",
"Child",
"with",
"the",
"given",
"name",
"ignoring",
"namespaces"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/XmlElementFinder.java#L151-L160 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/VisitUrl.java | VisitUrl.getVisitUrl | public static MozuUrl getVisitUrl(String responseFields, String visitId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/visits/{visitId}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("visitId", visitId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getVisitUrl(String responseFields, String visitId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/visits/{visitId}?responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("visitId", visitId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getVisitUrl",
"(",
"String",
"responseFields",
",",
"String",
"visitId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/visits/{visitId}?responseFields={responseFields}\"",
")",
";",
"formatt... | Get Resource Url for GetVisit
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param visitId Unique identifier of the customer visit to update.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetVisit"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/VisitUrl.java#L42-L48 | train |
mgm-tp/jfunk | jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptExecutor.java | ScriptExecutor.executeScript | public boolean executeScript(final File script, final Properties scriptProperties) {
checkState(script.exists(), "Script file does not exist: %s", script);
checkState(script.canRead(), "Script file is not readable: %s", script);
Reader reader = null;
boolean success = false;
Throwable throwable = null;
scriptScope.enterScope();
ScriptContext ctx = scriptContextProvider.get();
try {
reader = Files.newReader(script, charset);
ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByExtension("groovy");
ctx.setScript(script);
ctx.load(JFunkConstants.SCRIPT_PROPERTIES, false);
ctx.registerReporter(new SimpleReporter());
initGroovyCommands(scriptEngine, ctx);
initScriptProperties(scriptEngine, scriptProperties);
ScriptMetaData scriptMetaData = scriptMetaDataProvider.get();
scriptMetaData.setScriptName(script.getPath());
Date startDate = new Date();
scriptMetaData.setStartDate(startDate);
ctx.set(JFunkConstants.SCRIPT_START_MILLIS, String.valueOf(startDate.getTime()));
eventBus.post(scriptEngine);
eventBus.post(new BeforeScriptEvent(script.getAbsolutePath()));
scriptEngine.eval(reader);
success = true;
} catch (IOException ex) {
throwable = ex;
log.error("Error loading script: " + script, ex);
} catch (ScriptException ex) {
throwable = ex;
// Look up the cause hierarchy if we find a ModuleExecutionException.
// We only need to log exceptions other than ModuleExecutionException because they
// have already been logged and we don't want to pollute the log file any further.
// In fact, other exception cannot normally happen.
Throwable th = ex;
while (!(th instanceof ModuleExecutionException)) {
if (th == null) {
// log original exception
log.error("Error executing script: " + script, ex);
success = false;
break;
}
th = th.getCause();
}
} finally {
try {
ScriptMetaData scriptMetaData = scriptMetaDataProvider.get();
Date endDate = new Date();
scriptMetaData.setEndDate(endDate);
ctx.set(JFunkConstants.SCRIPT_END_MILLIS, String.valueOf(endDate.getTime()));
scriptMetaData.setThrowable(throwable);
eventBus.post(new AfterScriptEvent(script.getAbsolutePath(), success));
} finally {
scriptScope.exitScope();
closeQuietly(reader);
}
}
return success;
} | java | public boolean executeScript(final File script, final Properties scriptProperties) {
checkState(script.exists(), "Script file does not exist: %s", script);
checkState(script.canRead(), "Script file is not readable: %s", script);
Reader reader = null;
boolean success = false;
Throwable throwable = null;
scriptScope.enterScope();
ScriptContext ctx = scriptContextProvider.get();
try {
reader = Files.newReader(script, charset);
ScriptEngine scriptEngine = new ScriptEngineManager().getEngineByExtension("groovy");
ctx.setScript(script);
ctx.load(JFunkConstants.SCRIPT_PROPERTIES, false);
ctx.registerReporter(new SimpleReporter());
initGroovyCommands(scriptEngine, ctx);
initScriptProperties(scriptEngine, scriptProperties);
ScriptMetaData scriptMetaData = scriptMetaDataProvider.get();
scriptMetaData.setScriptName(script.getPath());
Date startDate = new Date();
scriptMetaData.setStartDate(startDate);
ctx.set(JFunkConstants.SCRIPT_START_MILLIS, String.valueOf(startDate.getTime()));
eventBus.post(scriptEngine);
eventBus.post(new BeforeScriptEvent(script.getAbsolutePath()));
scriptEngine.eval(reader);
success = true;
} catch (IOException ex) {
throwable = ex;
log.error("Error loading script: " + script, ex);
} catch (ScriptException ex) {
throwable = ex;
// Look up the cause hierarchy if we find a ModuleExecutionException.
// We only need to log exceptions other than ModuleExecutionException because they
// have already been logged and we don't want to pollute the log file any further.
// In fact, other exception cannot normally happen.
Throwable th = ex;
while (!(th instanceof ModuleExecutionException)) {
if (th == null) {
// log original exception
log.error("Error executing script: " + script, ex);
success = false;
break;
}
th = th.getCause();
}
} finally {
try {
ScriptMetaData scriptMetaData = scriptMetaDataProvider.get();
Date endDate = new Date();
scriptMetaData.setEndDate(endDate);
ctx.set(JFunkConstants.SCRIPT_END_MILLIS, String.valueOf(endDate.getTime()));
scriptMetaData.setThrowable(throwable);
eventBus.post(new AfterScriptEvent(script.getAbsolutePath(), success));
} finally {
scriptScope.exitScope();
closeQuietly(reader);
}
}
return success;
} | [
"public",
"boolean",
"executeScript",
"(",
"final",
"File",
"script",
",",
"final",
"Properties",
"scriptProperties",
")",
"{",
"checkState",
"(",
"script",
".",
"exists",
"(",
")",
",",
"\"Script file does not exist: %s\"",
",",
"script",
")",
";",
"checkState",
... | Executes the specified Groovy script.
@param script
the script file
@param scriptProperties
properties that are set to the script engine's binding and thus will be available
as variables in the Groovy script
@return the execution result, {@code true} if successful, {@code false} code | [
"Executes",
"the",
"specified",
"Groovy",
"script",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptExecutor.java#L92-L159 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/config/ThreadScope.java | ThreadScope.exitScope | @Override
public void exitScope() {
Map<Key<?>, Object> scopeMap = checkNotNull(getScopeMapForCurrentThread(),
"No scope map found for the current thread. Forgot to call enterScope()?");
performDisposal(scopeMap);
nonInheritableScopeCache.remove();
inheritableScopeCache.remove();
log.debug("Exited scope.");
} | java | @Override
public void exitScope() {
Map<Key<?>, Object> scopeMap = checkNotNull(getScopeMapForCurrentThread(),
"No scope map found for the current thread. Forgot to call enterScope()?");
performDisposal(scopeMap);
nonInheritableScopeCache.remove();
inheritableScopeCache.remove();
log.debug("Exited scope.");
} | [
"@",
"Override",
"public",
"void",
"exitScope",
"(",
")",
"{",
"Map",
"<",
"Key",
"<",
"?",
">",
",",
"Object",
">",
"scopeMap",
"=",
"checkNotNull",
"(",
"getScopeMapForCurrentThread",
"(",
")",
",",
"\"No scope map found for the current thread. Forgot to call ente... | Exits the scope context for the current thread. Call this method after a thread is done in
order to avoid memory leaks and to enable the thread to enter a new scope context again.
@throws IllegalStateException
if there is no scope context for the current thread | [
"Exits",
"the",
"scope",
"context",
"for",
"the",
"current",
"thread",
".",
"Call",
"this",
"method",
"after",
"a",
"thread",
"is",
"done",
"in",
"order",
"to",
"avoid",
"memory",
"leaks",
"and",
"to",
"enable",
"the",
"thread",
"to",
"enter",
"a",
"new"... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/config/ThreadScope.java#L101-L109 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java | LocationUrl.getLocationsInUsageTypeUrl | public static MozuUrl getLocationsInUsageTypeUrl(String filter, Boolean includeAttributeDefinition, String locationUsageType, Integer pageSize, String responseFields, String sortBy, Integer startIndex)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/storefront/locationUsageTypes/{locationUsageType}/locations?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}");
formatter.formatUrl("filter", filter);
formatter.formatUrl("includeAttributeDefinition", includeAttributeDefinition);
formatter.formatUrl("locationUsageType", locationUsageType);
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("sortBy", sortBy);
formatter.formatUrl("startIndex", startIndex);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getLocationsInUsageTypeUrl(String filter, Boolean includeAttributeDefinition, String locationUsageType, Integer pageSize, String responseFields, String sortBy, Integer startIndex)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/storefront/locationUsageTypes/{locationUsageType}/locations?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}");
formatter.formatUrl("filter", filter);
formatter.formatUrl("includeAttributeDefinition", includeAttributeDefinition);
formatter.formatUrl("locationUsageType", locationUsageType);
formatter.formatUrl("pageSize", pageSize);
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("sortBy", sortBy);
formatter.formatUrl("startIndex", startIndex);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getLocationsInUsageTypeUrl",
"(",
"String",
"filter",
",",
"Boolean",
"includeAttributeDefinition",
",",
"String",
"locationUsageType",
",",
"Integer",
"pageSize",
",",
"String",
"responseFields",
",",
"String",
"sortBy",
",",
"Integer",
... | Get Resource Url for GetLocationsInUsageType
@param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.
@param includeAttributeDefinition True if you want to include the custom attribute defintion for the location.
@param locationUsageType System-defined location usage type code, which is DS for direct ship, SP for in-store pickup, or storeFinder.
@param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.
@param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetLocationsInUsageType"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java#L43-L54 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java | LocationUrl.getDirectShipLocationUrl | public static MozuUrl getDirectShipLocationUrl(Boolean includeAttributeDefinition, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/storefront/locationUsageTypes/DS/location?includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}");
formatter.formatUrl("includeAttributeDefinition", includeAttributeDefinition);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getDirectShipLocationUrl(Boolean includeAttributeDefinition, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/storefront/locationUsageTypes/DS/location?includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}");
formatter.formatUrl("includeAttributeDefinition", includeAttributeDefinition);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getDirectShipLocationUrl",
"(",
"Boolean",
"includeAttributeDefinition",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/storefront/locationUsageTypes/DS/location?includeAttr... | Get Resource Url for GetDirectShipLocation
@param includeAttributeDefinition
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetDirectShipLocation"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java#L62-L68 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java | LocationUrl.getInStorePickupLocationUrl | public static MozuUrl getInStorePickupLocationUrl(Boolean includeAttributeDefinition, String locationCode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/storefront/locationUsageTypes/SP/locations/{locationCode}?includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}");
formatter.formatUrl("includeAttributeDefinition", includeAttributeDefinition);
formatter.formatUrl("locationCode", locationCode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getInStorePickupLocationUrl(Boolean includeAttributeDefinition, String locationCode, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/storefront/locationUsageTypes/SP/locations/{locationCode}?includeAttributeDefinition={includeAttributeDefinition}&responseFields={responseFields}");
formatter.formatUrl("includeAttributeDefinition", includeAttributeDefinition);
formatter.formatUrl("locationCode", locationCode);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getInStorePickupLocationUrl",
"(",
"Boolean",
"includeAttributeDefinition",
",",
"String",
"locationCode",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/storefront/lo... | Get Resource Url for GetInStorePickupLocation
@param includeAttributeDefinition True if you want to include the custom attribute definition for the location.
@param locationCode The unique, user-defined code that identifies a location.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetInStorePickupLocation"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java#L77-L84 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductReservationUrl.java | ProductReservationUrl.getProductReservationUrl | public static MozuUrl getProductReservationUrl(Integer productReservationId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/productreservations/{productReservationId}?responseFields={responseFields}");
formatter.formatUrl("productReservationId", productReservationId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getProductReservationUrl(Integer productReservationId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/productreservations/{productReservationId}?responseFields={responseFields}");
formatter.formatUrl("productReservationId", productReservationId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getProductReservationUrl",
"(",
"Integer",
"productReservationId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/productreservations/{productReservationId}?re... | Get Resource Url for GetProductReservation
@param productReservationId Unique identifier of the product reservation.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetProductReservation"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductReservationUrl.java#L42-L48 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductReservationUrl.java | ProductReservationUrl.commitReservationsUrl | public static MozuUrl commitReservationsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/productreservations/commit");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl commitReservationsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/productreservations/commit");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"commitReservationsUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/productreservations/commit\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl"... | Get Resource Url for CommitReservations
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"CommitReservations"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductReservationUrl.java#L66-L70 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductReservationUrl.java | ProductReservationUrl.updateProductReservationsUrl | public static MozuUrl updateProductReservationsUrl(Boolean skipInventoryCheck)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/productreservations/?skipInventoryCheck={skipInventoryCheck}");
formatter.formatUrl("skipInventoryCheck", skipInventoryCheck);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateProductReservationsUrl(Boolean skipInventoryCheck)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/productreservations/?skipInventoryCheck={skipInventoryCheck}");
formatter.formatUrl("skipInventoryCheck", skipInventoryCheck);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateProductReservationsUrl",
"(",
"Boolean",
"skipInventoryCheck",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/productreservations/?skipInventoryCheck={skipInventoryCheck}\"",
")",
";",
"... | Get Resource Url for UpdateProductReservations
@param skipInventoryCheck If true, skip the process to validate inventory when creating this product reservation.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateProductReservations"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductReservationUrl.java#L77-L82 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductReservationUrl.java | ProductReservationUrl.deleteProductReservationUrl | public static MozuUrl deleteProductReservationUrl(Integer productReservationId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/productreservations/{productReservationId}");
formatter.formatUrl("productReservationId", productReservationId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteProductReservationUrl(Integer productReservationId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/productreservations/{productReservationId}");
formatter.formatUrl("productReservationId", productReservationId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteProductReservationUrl",
"(",
"Integer",
"productReservationId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/productreservations/{productReservationId}\"",
")",
";",
"formatter",
"."... | Get Resource Url for DeleteProductReservation
@param productReservationId Unique identifier of the product reservation.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteProductReservation"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductReservationUrl.java#L89-L94 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerSegmentUrl.java | CustomerSegmentUrl.getSegmentUrl | public static MozuUrl getSegmentUrl(Integer id, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/segments/{id}?responseFields={responseFields}");
formatter.formatUrl("id", id);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getSegmentUrl(Integer id, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/segments/{id}?responseFields={responseFields}");
formatter.formatUrl("id", id);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getSegmentUrl",
"(",
"Integer",
"id",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/segments/{id}?responseFields={responseFields}\"",
")",
";",
"formatter",
... | Get Resource Url for GetSegment
@param id Unique identifier of the customer segment to retrieve.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetSegment"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerSegmentUrl.java#L42-L48 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerSegmentUrl.java | CustomerSegmentUrl.addSegmentAccountsUrl | public static MozuUrl addSegmentAccountsUrl(Integer id)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/segments/{id}/accounts");
formatter.formatUrl("id", id);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl addSegmentAccountsUrl(Integer id)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/segments/{id}/accounts");
formatter.formatUrl("id", id);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"addSegmentAccountsUrl",
"(",
"Integer",
"id",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/segments/{id}/accounts\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"id\"",
",",
"id"... | Get Resource Url for AddSegmentAccounts
@param id Unique identifier of the customer segment to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"AddSegmentAccounts"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerSegmentUrl.java#L67-L72 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerSegmentUrl.java | CustomerSegmentUrl.removeSegmentAccountUrl | public static MozuUrl removeSegmentAccountUrl(Integer accountId, Integer id)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/segments/{id}/accounts/{accountId}");
formatter.formatUrl("accountId", accountId);
formatter.formatUrl("id", id);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl removeSegmentAccountUrl(Integer accountId, Integer id)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/segments/{id}/accounts/{accountId}");
formatter.formatUrl("accountId", accountId);
formatter.formatUrl("id", id);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"removeSegmentAccountUrl",
"(",
"Integer",
"accountId",
",",
"Integer",
"id",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/segments/{id}/accounts/{accountId}\"",
")",
";",
"formatter",
"."... | Get Resource Url for RemoveSegmentAccount
@param accountId Unique identifier of the customer account.
@param id Unique identifier of the customer segment to retrieve.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RemoveSegmentAccount"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerSegmentUrl.java#L106-L112 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PaymentUrl.java | PaymentUrl.getAvailablePaymentActionsUrl | public static MozuUrl getAvailablePaymentActionsUrl(String orderId, String paymentId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/payments/{paymentId}/actions");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("paymentId", paymentId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getAvailablePaymentActionsUrl(String orderId, String paymentId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/payments/{paymentId}/actions");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("paymentId", paymentId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getAvailablePaymentActionsUrl",
"(",
"String",
"orderId",
",",
"String",
"paymentId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}/payments/{paymentId}/actions\"",
")",
";",
"format... | Get Resource Url for GetAvailablePaymentActions
@param orderId Unique identifier of the order.
@param paymentId Unique identifier of the payment for which to perform the action.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetAvailablePaymentActions"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PaymentUrl.java#L36-L42 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PaymentUrl.java | PaymentUrl.performPaymentActionUrl | public static MozuUrl performPaymentActionUrl(String orderId, String paymentId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/payments/{paymentId}/actions?responseFields={responseFields}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("paymentId", paymentId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl performPaymentActionUrl(String orderId, String paymentId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/payments/{paymentId}/actions?responseFields={responseFields}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("paymentId", paymentId);
formatter.formatUrl("responseFields", responseFields);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"performPaymentActionUrl",
"(",
"String",
"orderId",
",",
"String",
"paymentId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}/payments/{paymentId}/ac... | Get Resource Url for PerformPaymentAction
@param orderId Unique identifier of the order.
@param paymentId Unique identifier of the payment for which to perform the action.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"PerformPaymentAction"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PaymentUrl.java#L67-L74 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/ShippingUrl.java | ShippingUrl.getMultiRatesUrl | public static MozuUrl getMultiRatesUrl(Boolean includeRawResponse)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/shipping/request-multi-rates");
formatter.formatUrl("includeRawResponse", includeRawResponse);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getMultiRatesUrl(Boolean includeRawResponse)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/shipping/request-multi-rates");
formatter.formatUrl("includeRawResponse", includeRawResponse);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getMultiRatesUrl",
"(",
"Boolean",
"includeRawResponse",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/storefront/shipping/request-multi-rates\"",
")",
";",
"formatter",
".",
"formatUrl",
"("... | Get Resource Url for GetMultiRates
@param includeRawResponse Set this parameter to to retrieve the full raw JSON response from a shipping carrier (instead of just the shipping rate).
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetMultiRates"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/ShippingUrl.java#L21-L26 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.