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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/SerializeInterceptor.java | SerializeInterceptor.getMime | private String getMime(String name, String delimiter) {
if (StringUtils.hasText(name)) {
return name.substring(name.lastIndexOf(delimiter), name.length());
}
return null;
} | java | private String getMime(String name, String delimiter) {
if (StringUtils.hasText(name)) {
return name.substring(name.lastIndexOf(delimiter), name.length());
}
return null;
} | [
"private",
"String",
"getMime",
"(",
"String",
"name",
",",
"String",
"delimiter",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"name",
")",
")",
"{",
"return",
"name",
".",
"substring",
"(",
"name",
".",
"lastIndexOf",
"(",
"delimiter",
")",... | Method get the mime value from the given file name
@param name the filename
@param delimiter the delimiter
@return String the mime value | [
"Method",
"get",
"the",
"mime",
"value",
"from",
"the",
"given",
"file",
"name"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/SerializeInterceptor.java#L203-L208 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/RequestElements.java | RequestElements.setCompressedData | public void setCompressedData(byte[] compressedData) {
if (compressedData != null) {
this.compressedData = Arrays.copyOf(compressedData, compressedData.length);
}
} | java | public void setCompressedData(byte[] compressedData) {
if (compressedData != null) {
this.compressedData = Arrays.copyOf(compressedData, compressedData.length);
}
} | [
"public",
"void",
"setCompressedData",
"(",
"byte",
"[",
"]",
"compressedData",
")",
"{",
"if",
"(",
"compressedData",
"!=",
"null",
")",
"{",
"this",
".",
"compressedData",
"=",
"Arrays",
".",
"copyOf",
"(",
"compressedData",
",",
"compressedData",
".",
"le... | Sets compressed data
@param compressedData | [
"Sets",
"compressed",
"data"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/RequestElements.java#L619-L623 | train |
intuit/QuickBooks-V3-Java-SDK | payments-api/src/main/java/com/intuit/payment/services/BankAccountService.java | BankAccountService.create | public BankAccount create(BankAccount bankAccount, String customerId) throws BaseException {
logger.debug("Enter BankAccountService::create");
if (StringUtils.isBlank(customerId)) {
logger.error("IllegalArgumentException {}", customerId);
throw new IllegalArgumentException("customerId cannot be empty or n... | java | public BankAccount create(BankAccount bankAccount, String customerId) throws BaseException {
logger.debug("Enter BankAccountService::create");
if (StringUtils.isBlank(customerId)) {
logger.error("IllegalArgumentException {}", customerId);
throw new IllegalArgumentException("customerId cannot be empty or n... | [
"public",
"BankAccount",
"create",
"(",
"BankAccount",
"bankAccount",
",",
"String",
"customerId",
")",
"throws",
"BaseException",
"{",
"logger",
".",
"debug",
"(",
"\"Enter BankAccountService::create\"",
")",
";",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"c... | Method to create BankAccount for a given customer
@param bankAccount
@param customerId
@return
@throws BaseException | [
"Method",
"to",
"create",
"BankAccount",
"for",
"a",
"given",
"customer"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/payments-api/src/main/java/com/intuit/payment/services/BankAccountService.java#L73-L103 | train |
intuit/QuickBooks-V3-Java-SDK | payments-api/src/main/java/com/intuit/payment/services/BankAccountService.java | BankAccountService.getAllBankAccounts | @SuppressWarnings("unchecked")
public QueryResponse getAllBankAccounts(String customerId, int count) throws BaseException {
logger.debug("Enter BankAccountService::getAllBankAccounts");
if (StringUtils.isBlank(customerId)) {
logger.error("IllegalArgumentException {}", customerId);
throw new IllegalArgume... | java | @SuppressWarnings("unchecked")
public QueryResponse getAllBankAccounts(String customerId, int count) throws BaseException {
logger.debug("Enter BankAccountService::getAllBankAccounts");
if (StringUtils.isBlank(customerId)) {
logger.error("IllegalArgumentException {}", customerId);
throw new IllegalArgume... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"QueryResponse",
"getAllBankAccounts",
"(",
"String",
"customerId",
",",
"int",
"count",
")",
"throws",
"BaseException",
"{",
"logger",
".",
"debug",
"(",
"\"Enter BankAccountService::getAllBankAccounts\"",
"... | Method to Get All BankAccounts for a given customer specifying the count of records to be returned
@param customerId
@param count
@return
@throws BaseException | [
"Method",
"to",
"Get",
"All",
"BankAccounts",
"for",
"a",
"given",
"customer",
"specifying",
"the",
"count",
"of",
"records",
"to",
"be",
"returned"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/payments-api/src/main/java/com/intuit/payment/services/BankAccountService.java#L287-L323 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/MyMethodInterceptor.java | MyMethodInterceptor.extractEntity | private String extractEntity(Object obj) {
String name = obj.getClass().getSimpleName();
String[] extracted = name.split("\\$\\$");
if (extracted.length == NUM_3) {
return extracted[0];
}
return null;
} | java | private String extractEntity(Object obj) {
String name = obj.getClass().getSimpleName();
String[] extracted = name.split("\\$\\$");
if (extracted.length == NUM_3) {
return extracted[0];
}
return null;
} | [
"private",
"String",
"extractEntity",
"(",
"Object",
"obj",
")",
"{",
"String",
"name",
"=",
"obj",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
";",
"String",
"[",
"]",
"extracted",
"=",
"name",
".",
"split",
"(",
"\"\\\\$\\\\$\"",
")",
... | Method to extract the entity
@param obj the object
@return String the extracted entity | [
"Method",
"to",
"extract",
"the",
"entity"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/MyMethodInterceptor.java#L81-L88 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/MyMethodInterceptor.java | MyMethodInterceptor.extractPropertyName | protected String extractPropertyName(Method method) {
String name = method.getName();
name = name.startsWith("is") ? name.substring(NUM_2) : name.substring(NUM_3);
return name;
} | java | protected String extractPropertyName(Method method) {
String name = method.getName();
name = name.startsWith("is") ? name.substring(NUM_2) : name.substring(NUM_3);
return name;
} | [
"protected",
"String",
"extractPropertyName",
"(",
"Method",
"method",
")",
"{",
"String",
"name",
"=",
"method",
".",
"getName",
"(",
")",
";",
"name",
"=",
"name",
".",
"startsWith",
"(",
"\"is\"",
")",
"?",
"name",
".",
"substring",
"(",
"NUM_2",
")",... | extract the name of property from method called.
@param method
@return | [
"extract",
"the",
"name",
"of",
"property",
"from",
"method",
"called",
"."
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/MyMethodInterceptor.java#L96-L100 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/MyMethodInterceptor.java | MyMethodInterceptor.getObject | public Object getObject(Type type) throws FMSException {
Object obj = null;
if (type instanceof ParameterizedType) {
ParameterizedType pt = (ParameterizedType) type;
String typeString = pt.getActualTypeArguments()[0].toString().split(" ")[1];
try {
obj = Class.forName(typeString).newInstance();
} ca... | java | public Object getObject(Type type) throws FMSException {
Object obj = null;
if (type instanceof ParameterizedType) {
ParameterizedType pt = (ParameterizedType) type;
String typeString = pt.getActualTypeArguments()[0].toString().split(" ")[1];
try {
obj = Class.forName(typeString).newInstance();
} ca... | [
"public",
"Object",
"getObject",
"(",
"Type",
"type",
")",
"throws",
"FMSException",
"{",
"Object",
"obj",
"=",
"null",
";",
"if",
"(",
"type",
"instanceof",
"ParameterizedType",
")",
"{",
"ParameterizedType",
"pt",
"=",
"(",
"ParameterizedType",
")",
"type",
... | Method to get the object for the given type
@param type the type
@return Object the object
@throws Throwable | [
"Method",
"to",
"get",
"the",
"object",
"for",
"the",
"given",
"type"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/MyMethodInterceptor.java#L173-L185 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-data/src/main/java/com/intuit/ipp/data/EntitlementsResponse.java | EntitlementsResponse.getEntitlement | public List<EntitlementsResponse.Entitlement> getEntitlement() {
if (entitlement == null) {
entitlement = new ArrayList<EntitlementsResponse.Entitlement>();
}
return this.entitlement;
} | java | public List<EntitlementsResponse.Entitlement> getEntitlement() {
if (entitlement == null) {
entitlement = new ArrayList<EntitlementsResponse.Entitlement>();
}
return this.entitlement;
} | [
"public",
"List",
"<",
"EntitlementsResponse",
".",
"Entitlement",
">",
"getEntitlement",
"(",
")",
"{",
"if",
"(",
"entitlement",
"==",
"null",
")",
"{",
"entitlement",
"=",
"new",
"ArrayList",
"<",
"EntitlementsResponse",
".",
"Entitlement",
">",
"(",
")",
... | Gets the value of the entitlement property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a <CODE>set</CODE> method for the entitlement property.
<p>
For example, ... | [
"Gets",
"the",
"value",
"of",
"the",
"entitlement",
"property",
"."
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-data/src/main/java/com/intuit/ipp/data/EntitlementsResponse.java#L236-L241 | train |
intuit/QuickBooks-V3-Java-SDK | payments-api/src/main/java/com/intuit/payment/services/base/ServiceBase.java | ServiceBase.prepareResponse | public void prepareResponse(Request request, Response response, Entity entity) {
entity.setIntuit_tid(response.getIntuit_tid());
entity.setRequestId(request.getContext().getRequestId());
} | java | public void prepareResponse(Request request, Response response, Entity entity) {
entity.setIntuit_tid(response.getIntuit_tid());
entity.setRequestId(request.getContext().getRequestId());
} | [
"public",
"void",
"prepareResponse",
"(",
"Request",
"request",
",",
"Response",
"response",
",",
"Entity",
"entity",
")",
"{",
"entity",
".",
"setIntuit_tid",
"(",
"response",
".",
"getIntuit_tid",
"(",
")",
")",
";",
"entity",
".",
"setRequestId",
"(",
"re... | Sets additional attributes to the entity
@param request
@param res
@param entity | [
"Sets",
"additional",
"attributes",
"to",
"the",
"entity"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/payments-api/src/main/java/com/intuit/payment/services/base/ServiceBase.java#L165-L168 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/BooleanPath.java | BooleanPath.eq | public Expression<Boolean> eq(Boolean value) {
String valueString = value.toString();
return new Expression<Boolean>(this, Operation.eq, valueString);
} | java | public Expression<Boolean> eq(Boolean value) {
String valueString = value.toString();
return new Expression<Boolean>(this, Operation.eq, valueString);
} | [
"public",
"Expression",
"<",
"Boolean",
">",
"eq",
"(",
"Boolean",
"value",
")",
"{",
"String",
"valueString",
"=",
"value",
".",
"toString",
"(",
")",
";",
"return",
"new",
"Expression",
"<",
"Boolean",
">",
"(",
"this",
",",
"Operation",
".",
"eq",
"... | Method to construct the equals expression for boolean
@param value the boolean value
@return Expression | [
"Method",
"to",
"construct",
"the",
"equals",
"expression",
"for",
"boolean"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/BooleanPath.java#L44-L47 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/BooleanPath.java | BooleanPath.neq | public Expression<Boolean> neq(Boolean value) {
String valueString = value.toString();
return new Expression<Boolean>(this, Operation.neq, valueString);
} | java | public Expression<Boolean> neq(Boolean value) {
String valueString = value.toString();
return new Expression<Boolean>(this, Operation.neq, valueString);
} | [
"public",
"Expression",
"<",
"Boolean",
">",
"neq",
"(",
"Boolean",
"value",
")",
"{",
"String",
"valueString",
"=",
"value",
".",
"toString",
"(",
")",
";",
"return",
"new",
"Expression",
"<",
"Boolean",
">",
"(",
"this",
",",
"Operation",
".",
"neq",
... | Method to construct the not equals expression for boolean
@param value the boolean value
@return Expression | [
"Method",
"to",
"construct",
"the",
"not",
"equals",
"expression",
"for",
"boolean"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/BooleanPath.java#L54-L57 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/BooleanPath.java | BooleanPath.in | public Expression<Boolean> in(Boolean[] value) {
String listBooleanString = "";
Boolean firstNumber = true;
for (Boolean v : value) {
if (firstNumber) {
listBooleanString = listBooleanString.concat("(").concat(v.toString());
firstNumber = false;
} else {
listBooleanString = listBooleanString.con... | java | public Expression<Boolean> in(Boolean[] value) {
String listBooleanString = "";
Boolean firstNumber = true;
for (Boolean v : value) {
if (firstNumber) {
listBooleanString = listBooleanString.concat("(").concat(v.toString());
firstNumber = false;
} else {
listBooleanString = listBooleanString.con... | [
"public",
"Expression",
"<",
"Boolean",
">",
"in",
"(",
"Boolean",
"[",
"]",
"value",
")",
"{",
"String",
"listBooleanString",
"=",
"\"\"",
";",
"Boolean",
"firstNumber",
"=",
"true",
";",
"for",
"(",
"Boolean",
"v",
":",
"value",
")",
"{",
"if",
"(",
... | Method to construct the in expression for boolean
@param value the boolean value
@return Expression | [
"Method",
"to",
"construct",
"the",
"in",
"expression",
"for",
"boolean"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/BooleanPath.java#L64-L77 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-data/src/main/java/com/intuit/ipp/data/QueryResponse.java | QueryResponse.getIntuitObject | public List<JAXBElement<? extends IntuitEntity>> getIntuitObject() {
if (intuitObject == null) {
intuitObject = new ArrayList<JAXBElement<? extends IntuitEntity>>();
}
return this.intuitObject;
} | java | public List<JAXBElement<? extends IntuitEntity>> getIntuitObject() {
if (intuitObject == null) {
intuitObject = new ArrayList<JAXBElement<? extends IntuitEntity>>();
}
return this.intuitObject;
} | [
"public",
"List",
"<",
"JAXBElement",
"<",
"?",
"extends",
"IntuitEntity",
">",
">",
"getIntuitObject",
"(",
")",
"{",
"if",
"(",
"intuitObject",
"==",
"null",
")",
"{",
"intuitObject",
"=",
"new",
"ArrayList",
"<",
"JAXBElement",
"<",
"?",
"extends",
"Int... | Any IntuitEntity derived object like Customer, Invoice can be part of response Gets the value of the intuitObject property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there i... | [
"Any",
"IntuitEntity",
"derived",
"object",
"like",
"Customer",
"Invoice",
"can",
"be",
"part",
"of",
"response",
"Gets",
"the",
"value",
"of",
"the",
"intuitObject",
"property",
"."
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-data/src/main/java/com/intuit/ipp/data/QueryResponse.java#L190-L195 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/util/PropertyHelper.java | PropertyHelper.init | private static PropertyHelper init() {
propertHelper = new PropertyHelper();
try
{
ResourceBundle bundle = ResourceBundle.getBundle("ippdevkit");
propertHelper.setVersion(bundle.getString("version"));
propertHelper.setRequestSource(bundle.getString("request.source"));
propertHelper.setRequestSourceHead... | java | private static PropertyHelper init() {
propertHelper = new PropertyHelper();
try
{
ResourceBundle bundle = ResourceBundle.getBundle("ippdevkit");
propertHelper.setVersion(bundle.getString("version"));
propertHelper.setRequestSource(bundle.getString("request.source"));
propertHelper.setRequestSourceHead... | [
"private",
"static",
"PropertyHelper",
"init",
"(",
")",
"{",
"propertHelper",
"=",
"new",
"PropertyHelper",
"(",
")",
";",
"try",
"{",
"ResourceBundle",
"bundle",
"=",
"ResourceBundle",
".",
"getBundle",
"(",
"\"ippdevkit\"",
")",
";",
"propertHelper",
".",
"... | Method to init the PropertyHelper by loading the ippdevkit.properties file
@return PropertyHelper | [
"Method",
"to",
"init",
"the",
"PropertyHelper",
"by",
"loading",
"the",
"ippdevkit",
".",
"properties",
"file"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/util/PropertyHelper.java#L71-L85 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/CallbackHandlerInterceptor.java | CallbackHandlerInterceptor.getEntities | @SuppressWarnings("unchecked")
private <T extends IEntity> List<T> getEntities(QueryResponse queryResponse) {
List<T> entityList = new ArrayList<T>();
List<JAXBElement<? extends IntuitEntity>> intuitObjectsList = queryResponse.getIntuitObject();
// Iterate the IntuitObjects list in QueryResponse and convert t... | java | @SuppressWarnings("unchecked")
private <T extends IEntity> List<T> getEntities(QueryResponse queryResponse) {
List<T> entityList = new ArrayList<T>();
List<JAXBElement<? extends IntuitEntity>> intuitObjectsList = queryResponse.getIntuitObject();
// Iterate the IntuitObjects list in QueryResponse and convert t... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"<",
"T",
"extends",
"IEntity",
">",
"List",
"<",
"T",
">",
"getEntities",
"(",
"QueryResponse",
"queryResponse",
")",
"{",
"List",
"<",
"T",
">",
"entityList",
"=",
"new",
"ArrayList",
"<",
"T... | Method to parse the QueryResponse and create the entity list
@param queryResponse the query response
@return List<T> returns list of entity | [
"Method",
"to",
"parse",
"the",
"QueryResponse",
"and",
"create",
"the",
"entity",
"list"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/CallbackHandlerInterceptor.java#L163-L178 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/CallbackHandlerInterceptor.java | CallbackHandlerInterceptor.isDownload | private boolean isDownload(String action) {
if (StringUtils.hasText(action) && action.equals(OperationType.DOWNLOAD.toString())) {
return true;
}
return false;
} | java | private boolean isDownload(String action) {
if (StringUtils.hasText(action) && action.equals(OperationType.DOWNLOAD.toString())) {
return true;
}
return false;
} | [
"private",
"boolean",
"isDownload",
"(",
"String",
"action",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"action",
")",
"&&",
"action",
".",
"equals",
"(",
"OperationType",
".",
"DOWNLOAD",
".",
"toString",
"(",
")",
")",
")",
"{",
"return",... | Method to validate if the given action is download feature
@param action the action type
@return boolean returns true if the action is download | [
"Method",
"to",
"validate",
"if",
"the",
"given",
"action",
"is",
"download",
"feature"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/CallbackHandlerInterceptor.java#L290-L295 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/CallbackHandlerInterceptor.java | CallbackHandlerInterceptor.getDownloadedFile | private InputStream getDownloadedFile(String response) throws FMSException {
if (response != null) {
try {
URL url = new URL(response);
return url.openStream();
} catch (Exception e) {
throw new FMSException("Exception while downloading the file from URL.", e);
}
}
return null;
} | java | private InputStream getDownloadedFile(String response) throws FMSException {
if (response != null) {
try {
URL url = new URL(response);
return url.openStream();
} catch (Exception e) {
throw new FMSException("Exception while downloading the file from URL.", e);
}
}
return null;
} | [
"private",
"InputStream",
"getDownloadedFile",
"(",
"String",
"response",
")",
"throws",
"FMSException",
"{",
"if",
"(",
"response",
"!=",
"null",
")",
"{",
"try",
"{",
"URL",
"url",
"=",
"new",
"URL",
"(",
"response",
")",
";",
"return",
"url",
".",
"op... | Method to get the input stream from the download URL returned from service
@param response the download URL string
@return InputStream the downloaded file
@throws FMSException | [
"Method",
"to",
"get",
"the",
"input",
"stream",
"from",
"the",
"download",
"URL",
"returned",
"from",
"service"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/CallbackHandlerInterceptor.java#L309-L320 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PlatformInterceptorProvider.java | PlatformInterceptorProvider.executeRequestInterceptors | private void executeRequestInterceptors(final IntuitMessage intuitMessage) throws FMSException {
Iterator<Interceptor> itr = requestInterceptors.iterator();
while (itr.hasNext()) {
Interceptor interceptor = itr.next();
interceptor.execute(intuitMessage);
}
} | java | private void executeRequestInterceptors(final IntuitMessage intuitMessage) throws FMSException {
Iterator<Interceptor> itr = requestInterceptors.iterator();
while (itr.hasNext()) {
Interceptor interceptor = itr.next();
interceptor.execute(intuitMessage);
}
} | [
"private",
"void",
"executeRequestInterceptors",
"(",
"final",
"IntuitMessage",
"intuitMessage",
")",
"throws",
"FMSException",
"{",
"Iterator",
"<",
"Interceptor",
">",
"itr",
"=",
"requestInterceptors",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"itr",
".",
... | Method to execute only request interceptors which are added to requestInterceptors list
@param intuitMessage the intuit message
@throws FMSException the FMSException | [
"Method",
"to",
"execute",
"only",
"request",
"interceptors",
"which",
"are",
"added",
"to",
"requestInterceptors",
"list"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PlatformInterceptorProvider.java#L72-L78 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PlatformInterceptorProvider.java | PlatformInterceptorProvider.executeResponseInterceptors | private void executeResponseInterceptors(final IntuitMessage intuitMessage) throws FMSException {
Iterator<Interceptor> itr = responseInterceptors.iterator();
while (itr.hasNext()) {
Interceptor interceptor = itr.next();
interceptor.execute(intuitMessage);
}
} | java | private void executeResponseInterceptors(final IntuitMessage intuitMessage) throws FMSException {
Iterator<Interceptor> itr = responseInterceptors.iterator();
while (itr.hasNext()) {
Interceptor interceptor = itr.next();
interceptor.execute(intuitMessage);
}
} | [
"private",
"void",
"executeResponseInterceptors",
"(",
"final",
"IntuitMessage",
"intuitMessage",
")",
"throws",
"FMSException",
"{",
"Iterator",
"<",
"Interceptor",
">",
"itr",
"=",
"responseInterceptors",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"itr",
".",... | Method to execute only response interceptors which are added to the responseInterceptors list
@param intuitMessage the intuit message
@throws FMSException the FMSException | [
"Method",
"to",
"execute",
"only",
"response",
"interceptors",
"which",
"are",
"added",
"to",
"the",
"responseInterceptors",
"list"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PlatformInterceptorProvider.java#L86-L92 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/IntuitResponseDeserializerHelper.java | IntuitResponseDeserializerHelper.invokeFeature | protected void invokeFeature(String featureSwitch, Feature feature ) {
if(Config.getBooleanProperty(featureSwitch,true)) {
feature.execute();
}
} | java | protected void invokeFeature(String featureSwitch, Feature feature ) {
if(Config.getBooleanProperty(featureSwitch,true)) {
feature.execute();
}
} | [
"protected",
"void",
"invokeFeature",
"(",
"String",
"featureSwitch",
",",
"Feature",
"feature",
")",
"{",
"if",
"(",
"Config",
".",
"getBooleanProperty",
"(",
"featureSwitch",
",",
"true",
")",
")",
"{",
"feature",
".",
"execute",
"(",
")",
";",
"}",
"}"
... | Executes feature if switch setting is on
@param featureSwitch
@param feature | [
"Executes",
"feature",
"if",
"switch",
"setting",
"is",
"on"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/IntuitResponseDeserializerHelper.java#L52-L56 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/IntuitResponseDeserializerHelper.java | IntuitResponseDeserializerHelper.updateBigDecimalScale | protected void updateBigDecimalScale(IntuitEntity intuitType) {
Feature feature = new Feature() {
private IntuitEntity obj;
public <T extends IntuitEntity> void set(T object) {
obj = object;
}
public void execute() {
(new BigDecima... | java | protected void updateBigDecimalScale(IntuitEntity intuitType) {
Feature feature = new Feature() {
private IntuitEntity obj;
public <T extends IntuitEntity> void set(T object) {
obj = object;
}
public void execute() {
(new BigDecima... | [
"protected",
"void",
"updateBigDecimalScale",
"(",
"IntuitEntity",
"intuitType",
")",
"{",
"Feature",
"feature",
"=",
"new",
"Feature",
"(",
")",
"{",
"private",
"IntuitEntity",
"obj",
";",
"public",
"<",
"T",
"extends",
"IntuitEntity",
">",
"void",
"set",
"("... | Updates instances of BigDecimal with new scale in intuitEntity
@param intuitType | [
"Updates",
"instances",
"of",
"BigDecimal",
"with",
"new",
"scale",
"in",
"intuitEntity"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/IntuitResponseDeserializerHelper.java#L62-L75 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.prepareDataServiceRequest | private void prepareDataServiceRequest(IntuitMessage intuitMessage, RequestElements requestElements, Map<String, String> requestParameters,
String action) throws FMSException {
requestParameters.put(RequestElements.REQ_PARAM_RESOURCE_URL,
getUri(intuitMessage.isPlatformService(), action, requestElements.getCon... | java | private void prepareDataServiceRequest(IntuitMessage intuitMessage, RequestElements requestElements, Map<String, String> requestParameters,
String action) throws FMSException {
requestParameters.put(RequestElements.REQ_PARAM_RESOURCE_URL,
getUri(intuitMessage.isPlatformService(), action, requestElements.getCon... | [
"private",
"void",
"prepareDataServiceRequest",
"(",
"IntuitMessage",
"intuitMessage",
",",
"RequestElements",
"requestElements",
",",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
",",
"String",
"action",
")",
"throws",
"FMSException",
"{",
"requestP... | Method to prepare request parameters for data service
@param intuitMessage
the intuit message
@param requestElements
the request elements
@param requestParameters
the request parameters
@param action
the action type
@throws FMSException
the FMS Exception
@throws CompressionException
the Compression Exception | [
"Method",
"to",
"prepare",
"request",
"parameters",
"for",
"data",
"service"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L88-L127 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.setupAcceptEncoding | private void setupAcceptEncoding(Map<String, String> requestHeaders) {
// validates whether to add headers for accept-encoding for compression
String acceptCompressionFormat = Config.getProperty(Config.COMPRESSION_RESPONSE_FORMAT);
if (StringUtils.hasText(acceptCompressionFormat)) {
... | java | private void setupAcceptEncoding(Map<String, String> requestHeaders) {
// validates whether to add headers for accept-encoding for compression
String acceptCompressionFormat = Config.getProperty(Config.COMPRESSION_RESPONSE_FORMAT);
if (StringUtils.hasText(acceptCompressionFormat)) {
... | [
"private",
"void",
"setupAcceptEncoding",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"requestHeaders",
")",
"{",
"// validates whether to add headers for accept-encoding for compression",
"String",
"acceptCompressionFormat",
"=",
"Config",
".",
"getProperty",
"(",
"Conf... | Setup accept encoding header from configuration
@param requestHeaders | [
"Setup",
"accept",
"encoding",
"header",
"from",
"configuration"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L160-L166 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.setupAcceptHeader | private void setupAcceptHeader(String action, Map<String, String> requestHeaders, Map<String, String> requestParameters) {
// validates whether to add headers for accept for serialization
String serializeAcceptFormat = getSerializationResponseFormat();
if (StringUtils.hasText(serializeAcceptForm... | java | private void setupAcceptHeader(String action, Map<String, String> requestHeaders, Map<String, String> requestParameters) {
// validates whether to add headers for accept for serialization
String serializeAcceptFormat = getSerializationResponseFormat();
if (StringUtils.hasText(serializeAcceptForm... | [
"private",
"void",
"setupAcceptHeader",
"(",
"String",
"action",
",",
"Map",
"<",
"String",
",",
"String",
">",
"requestHeaders",
",",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
")",
"{",
"// validates whether to add headers for accept for serializ... | Setup accept header depends from the semantic of the request
@param action
@param requestHeaders | [
"Setup",
"accept",
"header",
"depends",
"from",
"the",
"semantic",
"of",
"the",
"request"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L173-L185 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.getEntityName | private <T extends IEntity> String getEntityName(T entity) {
if (entity != null) {
return entity.getClass().getSimpleName().toLowerCase();
}
return null;
} | java | private <T extends IEntity> String getEntityName(T entity) {
if (entity != null) {
return entity.getClass().getSimpleName().toLowerCase();
}
return null;
} | [
"private",
"<",
"T",
"extends",
"IEntity",
">",
"String",
"getEntityName",
"(",
"T",
"entity",
")",
"{",
"if",
"(",
"entity",
"!=",
"null",
")",
"{",
"return",
"entity",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
".",
"toLowerCase",
"("... | Method to get the entity name from the given entity object
@param entity
the entity object
@return returns entity name | [
"Method",
"to",
"get",
"the",
"entity",
"name",
"from",
"the",
"given",
"entity",
"object"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L211-L216 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.getUri | private <T extends IEntity> String getUri(Boolean platformService, String action, Context context, Map<String, String> requestParameters, Boolean entitlementService)
throws FMSException {
String uri = null;
if (!platformService) {
ServiceType serviceType = context.getIntuitServiceType();
if (entitlemen... | java | private <T extends IEntity> String getUri(Boolean platformService, String action, Context context, Map<String, String> requestParameters, Boolean entitlementService)
throws FMSException {
String uri = null;
if (!platformService) {
ServiceType serviceType = context.getIntuitServiceType();
if (entitlemen... | [
"private",
"<",
"T",
"extends",
"IEntity",
">",
"String",
"getUri",
"(",
"Boolean",
"platformService",
",",
"String",
"action",
",",
"Context",
"context",
",",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
",",
"Boolean",
"entitlementService",
... | Method to construct the URI
@param action
the entity name
@param context
the context
@param requestParameters
the request params
@return returns URI | [
"Method",
"to",
"construct",
"the",
"URI"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L229-L250 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.getBaseUrl | protected String getBaseUrl(String url) {
if (url.endsWith("/")) {
return url.substring(0, url.length() - 1);
}
else {
return url;
}
} | java | protected String getBaseUrl(String url) {
if (url.endsWith("/")) {
return url.substring(0, url.length() - 1);
}
else {
return url;
}
} | [
"protected",
"String",
"getBaseUrl",
"(",
"String",
"url",
")",
"{",
"if",
"(",
"url",
".",
"endsWith",
"(",
"\"/\"",
")",
")",
"{",
"return",
"url",
".",
"substring",
"(",
"0",
",",
"url",
".",
"length",
"(",
")",
"-",
"1",
")",
";",
"}",
"else"... | Return QBO base configuration from config file
@return URL | [
"Return",
"QBO",
"base",
"configuration",
"from",
"config",
"file"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L257-L265 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.prepareQBOUri | private <T extends IEntity> String prepareQBOUri(String entityName, Context context,
Map<String, String> requestParameters) throws FMSException {
StringBuilder uri = new StringBuilder();
if(entityName.equalsIgnoreCase("Taxservice"))
{
entityName = entityName + "/" + "taxcode";
}
// constructs... | java | private <T extends IEntity> String prepareQBOUri(String entityName, Context context,
Map<String, String> requestParameters) throws FMSException {
StringBuilder uri = new StringBuilder();
if(entityName.equalsIgnoreCase("Taxservice"))
{
entityName = entityName + "/" + "taxcode";
}
// constructs... | [
"private",
"<",
"T",
"extends",
"IEntity",
">",
"String",
"prepareQBOUri",
"(",
"String",
"entityName",
",",
"Context",
"context",
",",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
")",
"throws",
"FMSException",
"{",
"StringBuilder",
"uri",
"... | Method to construct the QBO URI
@param entityName
the entity name
@param context
the context
@param requestParameters
the request params
@return the QBO URI
@throws FMSException
the FMSException | [
"Method",
"to",
"construct",
"the",
"QBO",
"URI"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L280-L330 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.addEntityID | private void addEntityID(Map<String, String> requestParameters, StringBuilder uri) {
if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID))) {
uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID));
}
} | java | private void addEntityID(Map<String, String> requestParameters, StringBuilder uri) {
if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID))) {
uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID));
}
} | [
"private",
"void",
"addEntityID",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
",",
"StringBuilder",
"uri",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"requestParameters",
".",
"get",
"(",
"RequestElements",
".",
"REQ_PARAM... | adding the entity id in the URI, which is required for READ operation
@param requestParameters
@param uri | [
"adding",
"the",
"entity",
"id",
"in",
"the",
"URI",
"which",
"is",
"required",
"for",
"READ",
"operation"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L337-L341 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.addEntitySelector | private void addEntitySelector(Map<String, String> requestParameters, StringBuilder uri) {
if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))) {
uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR));
}
} | java | private void addEntitySelector(Map<String, String> requestParameters, StringBuilder uri) {
if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))) {
uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR));
}
} | [
"private",
"void",
"addEntitySelector",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
",",
"StringBuilder",
"uri",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"requestParameters",
".",
"get",
"(",
"RequestElements",
".",
"REQ... | adding additional selector in the URI, which is required for READ operation
Main purpose is to select or modify requested resource with well-defined keyword
@param requestParameters
@param uri | [
"adding",
"additional",
"selector",
"in",
"the",
"URI",
"which",
"is",
"required",
"for",
"READ",
"operation",
"Main",
"purpose",
"is",
"to",
"select",
"or",
"modify",
"requested",
"resource",
"with",
"well",
"-",
"defined",
"keyword"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L348-L352 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.prepareQBOPremierUri | private <T extends IEntity> String prepareQBOPremierUri(String entityName, Context context,
Map<String, String> requestParameters) throws FMSException {
StringBuilder uri = new StringBuilder();
// constructs request URI
uri.append(Config.getProperty("BASE_URL_QBO_OLB")).append("/").append(context.getRealmID(... | java | private <T extends IEntity> String prepareQBOPremierUri(String entityName, Context context,
Map<String, String> requestParameters) throws FMSException {
StringBuilder uri = new StringBuilder();
// constructs request URI
uri.append(Config.getProperty("BASE_URL_QBO_OLB")).append("/").append(context.getRealmID(... | [
"private",
"<",
"T",
"extends",
"IEntity",
">",
"String",
"prepareQBOPremierUri",
"(",
"String",
"entityName",
",",
"Context",
"context",
",",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
")",
"throws",
"FMSException",
"{",
"StringBuilder",
"ur... | Method to construct the OLB QBO URI
@param entityName
the entity name
@param context
the context
@param requestParameters
the request params
@return the QBO URI
@throws FMSException
the FMSException | [
"Method",
"to",
"construct",
"the",
"OLB",
"QBO",
"URI"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L373-L398 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.prepareIPSUri | private String prepareIPSUri(String action, Context context) throws FMSException {
StringBuilder uri = new StringBuilder();
uri.append(Config.getProperty(Config.BASE_URL_PLATFORMSERVICE)).append("/").append(context.getAppDBID())
.append("?act=").append(action).append("&token=").append(context.getAppToken());
r... | java | private String prepareIPSUri(String action, Context context) throws FMSException {
StringBuilder uri = new StringBuilder();
uri.append(Config.getProperty(Config.BASE_URL_PLATFORMSERVICE)).append("/").append(context.getAppDBID())
.append("?act=").append(action).append("&token=").append(context.getAppToken());
r... | [
"private",
"String",
"prepareIPSUri",
"(",
"String",
"action",
",",
"Context",
"context",
")",
"throws",
"FMSException",
"{",
"StringBuilder",
"uri",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"uri",
".",
"append",
"(",
"Config",
".",
"getProperty",
"(",
"C... | Method to construct the IPS URI
@param action
the entity name
@param context
the context
@return the IPS URI
@throws FMSException
the FMSException | [
"Method",
"to",
"construct",
"the",
"IPS",
"URI"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L411-L416 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.buildRequestParams | private String buildRequestParams(Map<String, String> requestParameters) throws FMSException {
StringBuilder reqParams = new StringBuilder();
Set<String> keySet = requestParameters.keySet();
Iterator<String> keySetIterator = keySet.iterator();
while (keySetIterator.hasNext()) {
String key = keySetIterator.n... | java | private String buildRequestParams(Map<String, String> requestParameters) throws FMSException {
StringBuilder reqParams = new StringBuilder();
Set<String> keySet = requestParameters.keySet();
Iterator<String> keySetIterator = keySet.iterator();
while (keySetIterator.hasNext()) {
String key = keySetIterator.n... | [
"private",
"String",
"buildRequestParams",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
")",
"throws",
"FMSException",
"{",
"StringBuilder",
"reqParams",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"Set",
"<",
"String",
">",
"keySet",
"=... | Method to build the request params which are to be added in the URI
@param requestParameters
the request parameters
@return returns constructed request param string | [
"Method",
"to",
"build",
"the",
"request",
"params",
"which",
"are",
"to",
"be",
"added",
"in",
"the",
"URI"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L432-L464 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.prepareUploadParams | private void prepareUploadParams(RequestElements requestElements) {
Map<String, String> requestHeaders = requestElements.getRequestHeaders();
UploadRequestElements uploadRequestElements = requestElements.getUploadRequestElements();
String boundaryId = uploadRequestElements.getBoundaryId();
String formMetadataNa... | java | private void prepareUploadParams(RequestElements requestElements) {
Map<String, String> requestHeaders = requestElements.getRequestHeaders();
UploadRequestElements uploadRequestElements = requestElements.getUploadRequestElements();
String boundaryId = uploadRequestElements.getBoundaryId();
String formMetadataNa... | [
"private",
"void",
"prepareUploadParams",
"(",
"RequestElements",
"requestElements",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"requestHeaders",
"=",
"requestElements",
".",
"getRequestHeaders",
"(",
")",
";",
"UploadRequestElements",
"uploadRequestElements",
... | Method to prepare the request params for upload functionality
@param requestElements the request elements | [
"Method",
"to",
"prepare",
"the",
"request",
"params",
"for",
"upload",
"functionality"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L537-L556 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.isDownloadPDF | private boolean isDownloadPDF(Map<String, String> map) {
return StringUtils.hasText(map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))
&& map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR).equalsIgnoreCase(ContentTypes.PDF.name());
} | java | private boolean isDownloadPDF(Map<String, String> map) {
return StringUtils.hasText(map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))
&& map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR).equalsIgnoreCase(ContentTypes.PDF.name());
} | [
"private",
"boolean",
"isDownloadPDF",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"map",
")",
"{",
"return",
"StringUtils",
".",
"hasText",
"(",
"map",
".",
"get",
"(",
"RequestElements",
".",
"REQ_PARAM_ENTITY_SELECTOR",
")",
")",
"&&",
"map",
".",
"g... | Method returns true if this request expects PDF as response
@param map
@return | [
"Method",
"returns",
"true",
"if",
"this",
"request",
"expects",
"PDF",
"as",
"response"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L576-L579 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.isSendEmail | private boolean isSendEmail(Map<String, String> map) {
return StringUtils.hasText(map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))
&& map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR).equalsIgnoreCase(RequestElements.PARAM_SEND_SELECTOR);
} | java | private boolean isSendEmail(Map<String, String> map) {
return StringUtils.hasText(map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))
&& map.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR).equalsIgnoreCase(RequestElements.PARAM_SEND_SELECTOR);
} | [
"private",
"boolean",
"isSendEmail",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"map",
")",
"{",
"return",
"StringUtils",
".",
"hasText",
"(",
"map",
".",
"get",
"(",
"RequestElements",
".",
"REQ_PARAM_ENTITY_SELECTOR",
")",
")",
"&&",
"map",
".",
"get... | Method returns true if this request should be send as email
@param map
@return | [
"Method",
"returns",
"true",
"if",
"this",
"request",
"should",
"be",
"send",
"as",
"email"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L586-L589 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.isUpload | private boolean isUpload(String action) {
if (StringUtils.hasText(action) && action.equals(OperationType.UPLOAD.toString())) {
return true;
}
return false;
} | java | private boolean isUpload(String action) {
if (StringUtils.hasText(action) && action.equals(OperationType.UPLOAD.toString())) {
return true;
}
return false;
} | [
"private",
"boolean",
"isUpload",
"(",
"String",
"action",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"action",
")",
"&&",
"action",
".",
"equals",
"(",
"OperationType",
".",
"UPLOAD",
".",
"toString",
"(",
")",
")",
")",
"{",
"return",
"... | Method to validate if the given action is upload feature
@param action the action type
@return boolean returns true if the action is upload | [
"Method",
"to",
"validate",
"if",
"the",
"given",
"action",
"is",
"upload",
"feature"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L597-L602 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/SyncErrorResponseDeserializer.java | SyncErrorResponseDeserializer.getSyncError | private SyncError getSyncError(JsonNode jsonNode) throws IOException {
ObjectMapper mapper = new ObjectMapper();
SimpleModule simpleModule = new SimpleModule("SyncErrorDeserializer", new Version(1, 0, 0, null));
simpleModule.addDeserializer(SyncError.class, new SyncErrorDeserializer());
mapper.registerModule(... | java | private SyncError getSyncError(JsonNode jsonNode) throws IOException {
ObjectMapper mapper = new ObjectMapper();
SimpleModule simpleModule = new SimpleModule("SyncErrorDeserializer", new Version(1, 0, 0, null));
simpleModule.addDeserializer(SyncError.class, new SyncErrorDeserializer());
mapper.registerModule(... | [
"private",
"SyncError",
"getSyncError",
"(",
"JsonNode",
"jsonNode",
")",
"throws",
"IOException",
"{",
"ObjectMapper",
"mapper",
"=",
"new",
"ObjectMapper",
"(",
")",
";",
"SimpleModule",
"simpleModule",
"=",
"new",
"SimpleModule",
"(",
"\"SyncErrorDeserializer\"",
... | Method to deserialize the SyncError object
@param jsonNode
@return QueryResponse | [
"Method",
"to",
"deserialize",
"the",
"SyncError",
"object"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/SyncErrorResponseDeserializer.java#L145-L154 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/EnumPath.java | EnumPath.eq | public Expression<Enum<?>> eq(Enum<?> value) {
String valueString = "'" + EnumPath.getValue(value) + "'";
return new Expression<Enum<?>>(this, Operation.eq, valueString);
} | java | public Expression<Enum<?>> eq(Enum<?> value) {
String valueString = "'" + EnumPath.getValue(value) + "'";
return new Expression<Enum<?>>(this, Operation.eq, valueString);
} | [
"public",
"Expression",
"<",
"Enum",
"<",
"?",
">",
">",
"eq",
"(",
"Enum",
"<",
"?",
">",
"value",
")",
"{",
"String",
"valueString",
"=",
"\"'\"",
"+",
"EnumPath",
".",
"getValue",
"(",
"value",
")",
"+",
"\"'\"",
";",
"return",
"new",
"Expression"... | Method to construct the equals expression for enum
@param value the enum
@return Expression | [
"Method",
"to",
"construct",
"the",
"equals",
"expression",
"for",
"enum"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/EnumPath.java#L46-L49 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/EnumPath.java | EnumPath.getValue | private static String getValue(Enum<?> value){
try{
Method m = value.getClass().getDeclaredMethod("value");
return (String) m.invoke(value);
} catch (NoSuchMethodException ex){
} catch (IllegalAccessException ex){
} catch (InvocationTargetException ex){
}
return value.toString();
} | java | private static String getValue(Enum<?> value){
try{
Method m = value.getClass().getDeclaredMethod("value");
return (String) m.invoke(value);
} catch (NoSuchMethodException ex){
} catch (IllegalAccessException ex){
} catch (InvocationTargetException ex){
}
return value.toString();
} | [
"private",
"static",
"String",
"getValue",
"(",
"Enum",
"<",
"?",
">",
"value",
")",
"{",
"try",
"{",
"Method",
"m",
"=",
"value",
".",
"getClass",
"(",
")",
".",
"getDeclaredMethod",
"(",
"\"value\"",
")",
";",
"return",
"(",
"String",
")",
"m",
"."... | Intuit data enumerations have a value property which should be used in queries instead of enum names.
@param value The enumeration for which to get the query value.
@return The query value based on the given enumeration. | [
"Intuit",
"data",
"enumerations",
"have",
"a",
"value",
"property",
"which",
"should",
"be",
"used",
"in",
"queries",
"instead",
"of",
"enum",
"names",
"."
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/expr/EnumPath.java#L132-L141 | train |
intuit/QuickBooks-V3-Java-SDK | payments-api/src/main/java/com/intuit/payment/services/TokenService.java | TokenService.createToken | public Token createToken(Token token) throws BaseException {
logger.debug("Enter TokenService::createToken");
// prepare API url
String apiUrl = requestContext.getBaseUrl() + "tokens";
logger.info("apiUrl - " + apiUrl);
// assign TypeReference for deserialization
TypeReference<Token> typeReference = ne... | java | public Token createToken(Token token) throws BaseException {
logger.debug("Enter TokenService::createToken");
// prepare API url
String apiUrl = requestContext.getBaseUrl() + "tokens";
logger.info("apiUrl - " + apiUrl);
// assign TypeReference for deserialization
TypeReference<Token> typeReference = ne... | [
"public",
"Token",
"createToken",
"(",
"Token",
"token",
")",
"throws",
"BaseException",
"{",
"logger",
".",
"debug",
"(",
"\"Enter TokenService::createToken\"",
")",
";",
"// prepare API url",
"String",
"apiUrl",
"=",
"requestContext",
".",
"getBaseUrl",
"(",
")",
... | Method to create BankAccount
@param token
@return
@throws BaseException | [
"Method",
"to",
"create",
"BankAccount"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/payments-api/src/main/java/com/intuit/payment/services/TokenService.java#L68-L92 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/BatchItemRequestSerializer.java | BatchItemRequestSerializer.getCDCQueryJson | private String getCDCQueryJson(CDCQuery cdcQuery) throws SerializationException {
ObjectMapper mapper = getObjectMapper();
String json = null;
try {
json = mapper.writeValueAsString(cdcQuery);
} catch (Exception e) {
throw new SerializationException(e);
}
return json;
} | java | private String getCDCQueryJson(CDCQuery cdcQuery) throws SerializationException {
ObjectMapper mapper = getObjectMapper();
String json = null;
try {
json = mapper.writeValueAsString(cdcQuery);
} catch (Exception e) {
throw new SerializationException(e);
}
return json;
} | [
"private",
"String",
"getCDCQueryJson",
"(",
"CDCQuery",
"cdcQuery",
")",
"throws",
"SerializationException",
"{",
"ObjectMapper",
"mapper",
"=",
"getObjectMapper",
"(",
")",
";",
"String",
"json",
"=",
"null",
";",
"try",
"{",
"json",
"=",
"mapper",
".",
"wri... | Method to get the Json string for CDCQuery object
@param cdcQuery
the CDCQuery entity describing need for query
@return the json string
@throws SerializationException
throws SerializationException | [
"Method",
"to",
"get",
"the",
"Json",
"string",
"for",
"CDCQuery",
"object"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/BatchItemRequestSerializer.java#L146-L156 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/BatchItemRequestSerializer.java | BatchItemRequestSerializer.getObjectMapper | private ObjectMapper getObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
AnnotationIntrospector primary = new JacksonAnnotationIntrospector();
AnnotationIntrospector secondary = new JaxbAnnotationIntrospector();
AnnotationIntrospector pair = new AnnotationIntrospectorPair(primary, secondary);
mappe... | java | private ObjectMapper getObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
AnnotationIntrospector primary = new JacksonAnnotationIntrospector();
AnnotationIntrospector secondary = new JaxbAnnotationIntrospector();
AnnotationIntrospector pair = new AnnotationIntrospectorPair(primary, secondary);
mappe... | [
"private",
"ObjectMapper",
"getObjectMapper",
"(",
")",
"{",
"ObjectMapper",
"mapper",
"=",
"new",
"ObjectMapper",
"(",
")",
";",
"AnnotationIntrospector",
"primary",
"=",
"new",
"JacksonAnnotationIntrospector",
"(",
")",
";",
"AnnotationIntrospector",
"secondary",
"=... | Method to get the Jackson object mapper
@return ObjectMapper the object mapper | [
"Method",
"to",
"get",
"the",
"Jackson",
"object",
"mapper"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/serialization/BatchItemRequestSerializer.java#L163-L173 | train |
intuit/QuickBooks-V3-Java-SDK | oauth2-platform-api/src/main/java/com/intuit/oauth2/client/OAuthMigrationClient.java | OAuthMigrationClient.migrate | public OAuthMigrationResponse migrate() throws ConnectionException {
logger.debug("Enter OAuthMigrationClient::migrate");
try {
HttpRequestClient client = new HttpRequestClient(oAuthMigrationRequest.getOauth2config().getProxyConfig());
//prepare post json
String requestjson = new JSONObjec... | java | public OAuthMigrationResponse migrate() throws ConnectionException {
logger.debug("Enter OAuthMigrationClient::migrate");
try {
HttpRequestClient client = new HttpRequestClient(oAuthMigrationRequest.getOauth2config().getProxyConfig());
//prepare post json
String requestjson = new JSONObjec... | [
"public",
"OAuthMigrationResponse",
"migrate",
"(",
")",
"throws",
"ConnectionException",
"{",
"logger",
".",
"debug",
"(",
"\"Enter OAuthMigrationClient::migrate\"",
")",
";",
"try",
"{",
"HttpRequestClient",
"client",
"=",
"new",
"HttpRequestClient",
"(",
"oAuthMigrat... | Calls the migrate API based on the the request provided and
returns an object with oauth2 tokens
@param environment
@return
@throws ConnectionException | [
"Calls",
"the",
"migrate",
"API",
"based",
"on",
"the",
"the",
"request",
"provided",
"and",
"returns",
"an",
"object",
"with",
"oauth2",
"tokens"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/oauth2-platform-api/src/main/java/com/intuit/oauth2/client/OAuthMigrationClient.java#L69-L106 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-data/src/main/java/com/intuit/sb/cdm/util/v3/DateAdapter.java | DateAdapter.unmarshal | public Date unmarshal(String value) {
if (value != null) {
if (value.length() >= lengthOfDateFmtYYYY_MM_DD) {
//Extract just the date from the string YYYY-MM-DD
value = value.substring(0, lengthOfDateFmtYYYY_MM_DD);
boolean isMatch = value.matches(datePattern);
if (isMatch) {
return Dat... | java | public Date unmarshal(String value) {
if (value != null) {
if (value.length() >= lengthOfDateFmtYYYY_MM_DD) {
//Extract just the date from the string YYYY-MM-DD
value = value.substring(0, lengthOfDateFmtYYYY_MM_DD);
boolean isMatch = value.matches(datePattern);
if (isMatch) {
return Dat... | [
"public",
"Date",
"unmarshal",
"(",
"String",
"value",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"if",
"(",
"value",
".",
"length",
"(",
")",
">=",
"lengthOfDateFmtYYYY_MM_DD",
")",
"{",
"//Extract just the date from the string YYYY-MM-DD",
"value",
... | Unmarshal a Date.
@param value String from which to unmarshal.
@return the unmarshalled Date object | [
"Unmarshal",
"a",
"Date",
"."
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-data/src/main/java/com/intuit/sb/cdm/util/v3/DateAdapter.java#L43-L62 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java | BatchOperation.addEntity | public <T extends IEntity> void addEntity(T entity, OperationEnum operation, String bId) {
BatchItemRequest batchItemRequest = new BatchItemRequest();
batchItemRequest.setBId(bId);
batchItemRequest.setOperation(operation);
batchItemRequest.setIntuitObject(getIntuitObject(entity));
batchItemRequests.add(... | java | public <T extends IEntity> void addEntity(T entity, OperationEnum operation, String bId) {
BatchItemRequest batchItemRequest = new BatchItemRequest();
batchItemRequest.setBId(bId);
batchItemRequest.setOperation(operation);
batchItemRequest.setIntuitObject(getIntuitObject(entity));
batchItemRequests.add(... | [
"public",
"<",
"T",
"extends",
"IEntity",
">",
"void",
"addEntity",
"(",
"T",
"entity",
",",
"OperationEnum",
"operation",
",",
"String",
"bId",
")",
"{",
"BatchItemRequest",
"batchItemRequest",
"=",
"new",
"BatchItemRequest",
"(",
")",
";",
"batchItemRequest",
... | Method to add the entity batch operations to the batchItemRequest
@param entity the entity
@param operation the OperationEnum
@param bId the batch Id | [
"Method",
"to",
"add",
"the",
"entity",
"batch",
"operations",
"to",
"the",
"batchItemRequest"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java#L95-L104 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java | BatchOperation.addQuery | public void addQuery(String query, String bId) {
BatchItemRequest batchItemRequest = new BatchItemRequest();
batchItemRequest.setBId(bId);
batchItemRequest.setQuery(query);
batchItemRequests.add(batchItemRequest);
bIds.add(bId);
} | java | public void addQuery(String query, String bId) {
BatchItemRequest batchItemRequest = new BatchItemRequest();
batchItemRequest.setBId(bId);
batchItemRequest.setQuery(query);
batchItemRequests.add(batchItemRequest);
bIds.add(bId);
} | [
"public",
"void",
"addQuery",
"(",
"String",
"query",
",",
"String",
"bId",
")",
"{",
"BatchItemRequest",
"batchItemRequest",
"=",
"new",
"BatchItemRequest",
"(",
")",
";",
"batchItemRequest",
".",
"setBId",
"(",
"bId",
")",
";",
"batchItemRequest",
".",
"setQ... | Method to add the query batch operation to batchItemRequest
@param query the query
@param bId the batch Id | [
"Method",
"to",
"add",
"the",
"query",
"batch",
"operation",
"to",
"batchItemRequest"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java#L112-L120 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java | BatchOperation.addCDCQuery | public void addCDCQuery(List<? extends IEntity> entities, String changedSince, String bId) throws FMSException {
if (entities == null || entities.isEmpty()) {
throw new FMSException("Entities is required.");
}
if (!StringUtils.hasText(changedSince)) {
throw new FMSException("changedSince is required."... | java | public void addCDCQuery(List<? extends IEntity> entities, String changedSince, String bId) throws FMSException {
if (entities == null || entities.isEmpty()) {
throw new FMSException("Entities is required.");
}
if (!StringUtils.hasText(changedSince)) {
throw new FMSException("changedSince is required."... | [
"public",
"void",
"addCDCQuery",
"(",
"List",
"<",
"?",
"extends",
"IEntity",
">",
"entities",
",",
"String",
"changedSince",
",",
"String",
"bId",
")",
"throws",
"FMSException",
"{",
"if",
"(",
"entities",
"==",
"null",
"||",
"entities",
".",
"isEmpty",
"... | Method to add the cdc query batch operation to batchItemRequest
@param entities the list of entities
@param changedSince the date where the entities should be listed from the last changed date
@param bId the batch Id | [
"Method",
"to",
"add",
"the",
"cdc",
"query",
"batch",
"operation",
"to",
"batchItemRequest"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java#L129-L161 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java | BatchOperation.addReportQuery | public void addReportQuery(String reportQuery, String bId) {
BatchItemRequest batchItemRequest = new BatchItemRequest();
batchItemRequest.setBId(bId);
batchItemRequest.setReportQuery(reportQuery);
batchItemRequests.add(batchItemRequest);
bIds.add(bId);
} | java | public void addReportQuery(String reportQuery, String bId) {
BatchItemRequest batchItemRequest = new BatchItemRequest();
batchItemRequest.setBId(bId);
batchItemRequest.setReportQuery(reportQuery);
batchItemRequests.add(batchItemRequest);
bIds.add(bId);
} | [
"public",
"void",
"addReportQuery",
"(",
"String",
"reportQuery",
",",
"String",
"bId",
")",
"{",
"BatchItemRequest",
"batchItemRequest",
"=",
"new",
"BatchItemRequest",
"(",
")",
";",
"batchItemRequest",
".",
"setBId",
"(",
"bId",
")",
";",
"batchItemRequest",
... | Method to add the report query batch operation to batchItemRequest
@param reportQuery
@param bId | [
"Method",
"to",
"add",
"the",
"report",
"query",
"batch",
"operation",
"to",
"batchItemRequest"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java#L169-L177 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java | BatchOperation.getIntuitObject | @SuppressWarnings("unchecked")
protected <T> JAXBElement<? extends IntuitEntity> getIntuitObject(T entity) {
Class<?> objectClass = entity.getClass();
String methodName = "create".concat(objectClass.getSimpleName());
ObjectFactory objectEntity = new ObjectFactory();
Class<?> objectEntityClass = objectEntity.ge... | java | @SuppressWarnings("unchecked")
protected <T> JAXBElement<? extends IntuitEntity> getIntuitObject(T entity) {
Class<?> objectClass = entity.getClass();
String methodName = "create".concat(objectClass.getSimpleName());
ObjectFactory objectEntity = new ObjectFactory();
Class<?> objectEntityClass = objectEntity.ge... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"<",
"T",
">",
"JAXBElement",
"<",
"?",
"extends",
"IntuitEntity",
">",
"getIntuitObject",
"(",
"T",
"entity",
")",
"{",
"Class",
"<",
"?",
">",
"objectClass",
"=",
"entity",
".",
"getClass",
... | Method to get the corresponding IEntity type for the given JAXBElement
@param entity
@return entity | [
"Method",
"to",
"get",
"the",
"corresponding",
"IEntity",
"type",
"for",
"the",
"given",
"JAXBElement"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/BatchOperation.java#L343-L364 | train |
intuit/QuickBooks-V3-Java-SDK | oauth2-platform-api/src/main/java/com/intuit/oauth2/http/HttpRequestClient.java | HttpRequestClient.setProxyAuthentication | public CredentialsProvider setProxyAuthentication(ProxyConfig proxyConfig) {
if (proxyConfig == null) {
return null;
}
String username = proxyConfig.getUsername();
String password = proxyConfig.getPassword();
if (!username.isEmpty() && !password.isEmpty()) {
String host = proxyConfig.getHost();
Str... | java | public CredentialsProvider setProxyAuthentication(ProxyConfig proxyConfig) {
if (proxyConfig == null) {
return null;
}
String username = proxyConfig.getUsername();
String password = proxyConfig.getPassword();
if (!username.isEmpty() && !password.isEmpty()) {
String host = proxyConfig.getHost();
Str... | [
"public",
"CredentialsProvider",
"setProxyAuthentication",
"(",
"ProxyConfig",
"proxyConfig",
")",
"{",
"if",
"(",
"proxyConfig",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"String",
"username",
"=",
"proxyConfig",
".",
"getUsername",
"(",
")",
";",
"... | Method to set proxy authentication
@return | [
"Method",
"to",
"set",
"proxy",
"authentication"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/oauth2-platform-api/src/main/java/com/intuit/oauth2/http/HttpRequestClient.java#L119-L142 | train |
intuit/QuickBooks-V3-Java-SDK | oauth2-platform-api/src/main/java/com/intuit/oauth2/http/HttpRequestClient.java | HttpRequestClient.makeJsonRequest | public Response makeJsonRequest(Request request, OAuthMigrationRequest migrationRequest) throws InvalidRequestException {
logger.debug("Enter HttpRequestClient::makeJsonRequest");
//create oauth consumer using tokens
OAuthConsumer consumer = new CommonsHttpOAuthConsumer(migrationRequest.getConsumerKey(), migrati... | java | public Response makeJsonRequest(Request request, OAuthMigrationRequest migrationRequest) throws InvalidRequestException {
logger.debug("Enter HttpRequestClient::makeJsonRequest");
//create oauth consumer using tokens
OAuthConsumer consumer = new CommonsHttpOAuthConsumer(migrationRequest.getConsumerKey(), migrati... | [
"public",
"Response",
"makeJsonRequest",
"(",
"Request",
"request",
",",
"OAuthMigrationRequest",
"migrationRequest",
")",
"throws",
"InvalidRequestException",
"{",
"logger",
".",
"debug",
"(",
"\"Enter HttpRequestClient::makeJsonRequest\"",
")",
";",
"//create oauth consumer... | Method to make the HTTP POST request using the request attributes supplied
@param request
@return
@throws InvalidRequestException | [
"Method",
"to",
"make",
"the",
"HTTP",
"POST",
"request",
"using",
"the",
"request",
"attributes",
"supplied"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/oauth2-platform-api/src/main/java/com/intuit/oauth2/http/HttpRequestClient.java#L215-L262 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/util/MessageUtils.java | MessageUtils.createMarshaller | public static Marshaller createMarshaller() throws JAXBException {
Marshaller marshaller = MessageUtilsHelper.getContext().createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
return marshaller;
} | java | public static Marshaller createMarshaller() throws JAXBException {
Marshaller marshaller = MessageUtilsHelper.getContext().createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
return marshaller;
} | [
"public",
"static",
"Marshaller",
"createMarshaller",
"(",
")",
"throws",
"JAXBException",
"{",
"Marshaller",
"marshaller",
"=",
"MessageUtilsHelper",
".",
"getContext",
"(",
")",
".",
"createMarshaller",
"(",
")",
";",
"marshaller",
".",
"setProperty",
"(",
"Mars... | Create Marshaller from the JAXB context.
@return Marshaller | [
"Create",
"Marshaller",
"from",
"the",
"JAXB",
"context",
"."
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/util/MessageUtils.java#L69-L73 | train |
intuit/QuickBooks-V3-Java-SDK | oauth2-platform-api/src/main/java/com/intuit/oauth2/http/Request.java | Request.constructURL | public URL constructURL() throws InvalidRequestException {
String stringUri = url;
try {
URI uri = new URI(stringUri);
return uri.toURL();
} catch (final URISyntaxException e) {
throw new InvalidRequestException("Bad URI: " + stringUri, e);
} catch... | java | public URL constructURL() throws InvalidRequestException {
String stringUri = url;
try {
URI uri = new URI(stringUri);
return uri.toURL();
} catch (final URISyntaxException e) {
throw new InvalidRequestException("Bad URI: " + stringUri, e);
} catch... | [
"public",
"URL",
"constructURL",
"(",
")",
"throws",
"InvalidRequestException",
"{",
"String",
"stringUri",
"=",
"url",
";",
"try",
"{",
"URI",
"uri",
"=",
"new",
"URI",
"(",
"stringUri",
")",
";",
"return",
"uri",
".",
"toURL",
"(",
")",
";",
"}",
"ca... | Prepares request URL
@return
@throws InvalidRequestException | [
"Prepares",
"request",
"URL"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/oauth2-platform-api/src/main/java/com/intuit/oauth2/http/Request.java#L85-L97 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/OptionalSyntax.java | OptionalSyntax.where | public OptionalSyntax where(Expression<?>... expression) {
for (Expression<?> exp : expression) {
getMessage().getOptional().add(exp.toString());
LOG.debug("expression: " + exp);
}
QueryMessage mess = getMessage();
return new OptionalSyntax(mess);
} | java | public OptionalSyntax where(Expression<?>... expression) {
for (Expression<?> exp : expression) {
getMessage().getOptional().add(exp.toString());
LOG.debug("expression: " + exp);
}
QueryMessage mess = getMessage();
return new OptionalSyntax(mess);
} | [
"public",
"OptionalSyntax",
"where",
"(",
"Expression",
"<",
"?",
">",
"...",
"expression",
")",
"{",
"for",
"(",
"Expression",
"<",
"?",
">",
"exp",
":",
"expression",
")",
"{",
"getMessage",
"(",
")",
".",
"getOptional",
"(",
")",
".",
"add",
"(",
... | Method to get the optional syntax for where operator
@param expression the expression
@return OptionalSyntax the optional syntax | [
"Method",
"to",
"get",
"the",
"optional",
"syntax",
"for",
"where",
"operator"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/OptionalSyntax.java#L52-L59 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/OptionalSyntax.java | OptionalSyntax.orderBy | public OptionalSyntax orderBy(Path<?>... path) {
String fieldList = "";
boolean firstExpression = true;
for (Path<?> exp : path) {
if (firstExpression) {
fieldList = fieldList.concat(exp.toString());
firstExpression = false;
} else {
fieldList = fieldList.concat(", ").concat(exp.toString());
... | java | public OptionalSyntax orderBy(Path<?>... path) {
String fieldList = "";
boolean firstExpression = true;
for (Path<?> exp : path) {
if (firstExpression) {
fieldList = fieldList.concat(exp.toString());
firstExpression = false;
} else {
fieldList = fieldList.concat(", ").concat(exp.toString());
... | [
"public",
"OptionalSyntax",
"orderBy",
"(",
"Path",
"<",
"?",
">",
"...",
"path",
")",
"{",
"String",
"fieldList",
"=",
"\"\"",
";",
"boolean",
"firstExpression",
"=",
"true",
";",
"for",
"(",
"Path",
"<",
"?",
">",
"exp",
":",
"path",
")",
"{",
"if"... | Method to get the optional syntax for order by operator
@param Path the path
@return OptionalSyntax the optional syntax | [
"Method",
"to",
"get",
"the",
"optional",
"syntax",
"for",
"order",
"by",
"operator"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/OptionalSyntax.java#L67-L83 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/OptionalSyntax.java | OptionalSyntax.skip | public OptionalSyntax skip(int num) {
getMessage().setStartposition(num);
QueryMessage mess = getMessage();
return new OptionalSyntax(mess);
} | java | public OptionalSyntax skip(int num) {
getMessage().setStartposition(num);
QueryMessage mess = getMessage();
return new OptionalSyntax(mess);
} | [
"public",
"OptionalSyntax",
"skip",
"(",
"int",
"num",
")",
"{",
"getMessage",
"(",
")",
".",
"setStartposition",
"(",
"num",
")",
";",
"QueryMessage",
"mess",
"=",
"getMessage",
"(",
")",
";",
"return",
"new",
"OptionalSyntax",
"(",
"mess",
")",
";",
"}... | Method to get the optional syntax for skip operator
@param num the number
@return OptionalSyntax the optional syntax | [
"Method",
"to",
"get",
"the",
"optional",
"syntax",
"for",
"skip",
"operator"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/OptionalSyntax.java#L143-L147 | train |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/OptionalSyntax.java | OptionalSyntax.take | public OptionalSyntax take(int num) {
getMessage().setMaxresults(num);
QueryMessage mess = getMessage();
return new OptionalSyntax(mess);
} | java | public OptionalSyntax take(int num) {
getMessage().setMaxresults(num);
QueryMessage mess = getMessage();
return new OptionalSyntax(mess);
} | [
"public",
"OptionalSyntax",
"take",
"(",
"int",
"num",
")",
"{",
"getMessage",
"(",
")",
".",
"setMaxresults",
"(",
"num",
")",
";",
"QueryMessage",
"mess",
"=",
"getMessage",
"(",
")",
";",
"return",
"new",
"OptionalSyntax",
"(",
"mess",
")",
";",
"}"
] | Method to get the optional syntax for take operator
@param num the number
@return OptionalSyntax the optional syntax | [
"Method",
"to",
"get",
"the",
"optional",
"syntax",
"for",
"take",
"operator"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/query/OptionalSyntax.java#L155-L159 | train |
intuit/QuickBooks-V3-Java-SDK | payments-api/src/main/java/com/intuit/payment/http/HttpRequestClient.java | HttpRequestClient.getResult | public static String getResult(HttpResponse response) throws IOException {
StringBuffer result = new StringBuffer();
if (response.getEntity() != null && response.getEntity().getContent() != null) {
BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
String line = ... | java | public static String getResult(HttpResponse response) throws IOException {
StringBuffer result = new StringBuffer();
if (response.getEntity() != null && response.getEntity().getContent() != null) {
BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
String line = ... | [
"public",
"static",
"String",
"getResult",
"(",
"HttpResponse",
"response",
")",
"throws",
"IOException",
"{",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"response",
".",
"getEntity",
"(",
")",
"!=",
"null",
"&&",
"respon... | Parse the response and return the string from httpresponse body
@param response
@return String
@throws IOException | [
"Parse",
"the",
"response",
"and",
"return",
"the",
"string",
"from",
"httpresponse",
"body"
] | 59f988d0776d46620d0b34711c411b2b5b1da06b | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/payments-api/src/main/java/com/intuit/payment/http/HttpRequestClient.java#L234-L245 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlQuery.java | JavaXmlQuery.compile | JavaXmlQuery compile(XPath xpath) {
try {
this.expression = xpath.compile(getQuery());
} catch (XPathExpressionException e) {
LOGGER.error("Cannot compile XPath query: " + getQuery(), e);
}
return this;
} | java | JavaXmlQuery compile(XPath xpath) {
try {
this.expression = xpath.compile(getQuery());
} catch (XPathExpressionException e) {
LOGGER.error("Cannot compile XPath query: " + getQuery(), e);
}
return this;
} | [
"JavaXmlQuery",
"compile",
"(",
"XPath",
"xpath",
")",
"{",
"try",
"{",
"this",
".",
"expression",
"=",
"xpath",
".",
"compile",
"(",
"getQuery",
"(",
")",
")",
";",
"}",
"catch",
"(",
"XPathExpressionException",
"e",
")",
"{",
"LOGGER",
".",
"error",
... | Adds a compiled expression to the query
@param expression
@return | [
"Adds",
"a",
"compiled",
"expression",
"to",
"the",
"query"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlQuery.java#L51-L58 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/AbstractXmlProcessor.java | AbstractXmlProcessor.getObjectValue | private Object getObjectValue(XmlNode node, String fieldName) {
// we have to take into account the fact that fieldName will be in the lower case
if (node != null) {
String name = node.getName();
switch (node.getType()) {
case XmlNode.ATTRIBUTE_NODE:
... | java | private Object getObjectValue(XmlNode node, String fieldName) {
// we have to take into account the fact that fieldName will be in the lower case
if (node != null) {
String name = node.getName();
switch (node.getType()) {
case XmlNode.ATTRIBUTE_NODE:
... | [
"private",
"Object",
"getObjectValue",
"(",
"XmlNode",
"node",
",",
"String",
"fieldName",
")",
"{",
"// we have to take into account the fact that fieldName will be in the lower case",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"String",
"name",
"=",
"node",
".",
"ge... | Returns the object value for the given VTD XML node and field name
@param node
the node
@param fieldName
the field name
@return the object value for the given VTD XML node and field name | [
"Returns",
"the",
"object",
"value",
"for",
"the",
"given",
"VTD",
"XML",
"node",
"and",
"field",
"name"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/AbstractXmlProcessor.java#L79-L105 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/AbstractXmlProcessor.java | AbstractXmlProcessor.getStringValue | private String getStringValue(XmlNodeArray nodes) {
StringBuilder stringBuilder = new StringBuilder();
// If all we have is just a bunch of nodes and the user wants a string
// we'll use a parent element called <string> to have a valid XML document
stringBuilder.append("<string>");
... | java | private String getStringValue(XmlNodeArray nodes) {
StringBuilder stringBuilder = new StringBuilder();
// If all we have is just a bunch of nodes and the user wants a string
// we'll use a parent element called <string> to have a valid XML document
stringBuilder.append("<string>");
... | [
"private",
"String",
"getStringValue",
"(",
"XmlNodeArray",
"nodes",
")",
"{",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"// If all we have is just a bunch of nodes and the user wants a string",
"// we'll use a parent element called <string> to h... | Returns the string value for the given node array
@param nodes
@return the string value for the given node array | [
"Returns",
"the",
"string",
"value",
"for",
"the",
"given",
"node",
"array"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/AbstractXmlProcessor.java#L169-L179 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java | JavaXmlProcessor.getObjectValue | private Object getObjectValue(Node node, String fieldName) {
// we have to take into account the fact that fieldName will be in the lower case
if (node != null) {
String name = node.getLocalName();
switch (node.getNodeType()) {
case Node.ATTRIBUTE_NODE:
... | java | private Object getObjectValue(Node node, String fieldName) {
// we have to take into account the fact that fieldName will be in the lower case
if (node != null) {
String name = node.getLocalName();
switch (node.getNodeType()) {
case Node.ATTRIBUTE_NODE:
... | [
"private",
"Object",
"getObjectValue",
"(",
"Node",
"node",
",",
"String",
"fieldName",
")",
"{",
"// we have to take into account the fact that fieldName will be in the lower case",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"String",
"name",
"=",
"node",
".",
"getLo... | Returns the object value for the given field name and node
@param node
the node
@param fieldName
the field name
@return the object value for the given field name and node | [
"Returns",
"the",
"object",
"value",
"for",
"the",
"given",
"field",
"name",
"and",
"node"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java#L168-L194 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java | JavaXmlProcessor.getStringValue | private String getStringValue(Object o) {
if (o instanceof String) {
return (String) o;
} else if (o instanceof NodeArray) {
NodeArray array = (NodeArray) o;
switch (array.size()) {
case 0:
return null;
case 1: {
... | java | private String getStringValue(Object o) {
if (o instanceof String) {
return (String) o;
} else if (o instanceof NodeArray) {
NodeArray array = (NodeArray) o;
switch (array.size()) {
case 0:
return null;
case 1: {
... | [
"private",
"String",
"getStringValue",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"o",
"instanceof",
"String",
")",
"{",
"return",
"(",
"String",
")",
"o",
";",
"}",
"else",
"if",
"(",
"o",
"instanceof",
"NodeArray",
")",
"{",
"NodeArray",
"array",
"=",
... | Returns the string value for the object
@param o
the object
@return the string value for the object | [
"Returns",
"the",
"string",
"value",
"for",
"the",
"object"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java#L203-L223 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java | JavaXmlProcessor.getStringValue | private String getStringValue(Node node) {
switch (node.getNodeType()) {
case Node.ATTRIBUTE_NODE:
case Node.TEXT_NODE:
return node.getNodeValue();
default: {
try {
Transformer transformer = TRANSFORMER_FACTORY.newTransforme... | java | private String getStringValue(Node node) {
switch (node.getNodeType()) {
case Node.ATTRIBUTE_NODE:
case Node.TEXT_NODE:
return node.getNodeValue();
default: {
try {
Transformer transformer = TRANSFORMER_FACTORY.newTransforme... | [
"private",
"String",
"getStringValue",
"(",
"Node",
"node",
")",
"{",
"switch",
"(",
"node",
".",
"getNodeType",
"(",
")",
")",
"{",
"case",
"Node",
".",
"ATTRIBUTE_NODE",
":",
"case",
"Node",
".",
"TEXT_NODE",
":",
"return",
"node",
".",
"getNodeValue",
... | Returns the string value for the node
@param node
the node
@return the string value for the node | [
"Returns",
"the",
"string",
"value",
"for",
"the",
"node"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java#L232-L249 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java | JavaXmlProcessor.getStringValue | private String getStringValue(NodeArray nodes) {
StringBuilder stringBuilder = new StringBuilder();
// If all we have is just a bunch of nodes and the user wants a string
// we'll use a parent element called <string> to have a valid XML document
stringBuilder.append("<string>");
... | java | private String getStringValue(NodeArray nodes) {
StringBuilder stringBuilder = new StringBuilder();
// If all we have is just a bunch of nodes and the user wants a string
// we'll use a parent element called <string> to have a valid XML document
stringBuilder.append("<string>");
... | [
"private",
"String",
"getStringValue",
"(",
"NodeArray",
"nodes",
")",
"{",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"// If all we have is just a bunch of nodes and the user wants a string",
"// we'll use a parent element called <string> to have... | Returns the string value for the node array
@param node
the node array
@return the string value for the node array | [
"Returns",
"the",
"string",
"value",
"for",
"the",
"node",
"array"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java#L258-L268 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java | JavaXmlProcessor.populateMap | @SuppressWarnings({"unchecked", "rawtypes"})
private void populateMap(Map map, Node node) {
Map.Entry entry = getMapEntry(node);
if (entry != null) {
map.put(entry.getKey(), entry.getValue());
}
} | java | @SuppressWarnings({"unchecked", "rawtypes"})
private void populateMap(Map map, Node node) {
Map.Entry entry = getMapEntry(node);
if (entry != null) {
map.put(entry.getKey(), entry.getValue());
}
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"private",
"void",
"populateMap",
"(",
"Map",
"map",
",",
"Node",
"node",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"getMapEntry",
"(",
"node",
")",
";",
"if",
"(",
"... | Given the node populates the map
@param map
the map
@param node
the node | [
"Given",
"the",
"node",
"populates",
"the",
"map"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/java/JavaXmlProcessor.java#L385-L391 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/XmlNode.java | XmlNode.addAttribute | public void addAttribute(final String _name, final String _value) {
this.attributes.put(_name, new XmlNode() {
{
this.name = _name;
this.value = _value;
this.valid = true;
this.type = XmlNode.ATTRIBUTE_NODE;
}
});
... | java | public void addAttribute(final String _name, final String _value) {
this.attributes.put(_name, new XmlNode() {
{
this.name = _name;
this.value = _value;
this.valid = true;
this.type = XmlNode.ATTRIBUTE_NODE;
}
});
... | [
"public",
"void",
"addAttribute",
"(",
"final",
"String",
"_name",
",",
"final",
"String",
"_value",
")",
"{",
"this",
".",
"attributes",
".",
"put",
"(",
"_name",
",",
"new",
"XmlNode",
"(",
")",
"{",
"{",
"this",
".",
"name",
"=",
"_name",
";",
"th... | Adds the attribute
@param _name
the attribute name
@param _value
the attribute name | [
"Adds",
"the",
"attribute"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/XmlNode.java#L155-L164 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/XmlUtils.java | XmlUtils.getPrimitiveValue | public static Object getPrimitiveValue(String value, PrimitiveCategory primitiveCategory) {
if (value != null) {
try {
switch (primitiveCategory) {
case BOOLEAN:
return Boolean.valueOf(value);
case BYTE:
... | java | public static Object getPrimitiveValue(String value, PrimitiveCategory primitiveCategory) {
if (value != null) {
try {
switch (primitiveCategory) {
case BOOLEAN:
return Boolean.valueOf(value);
case BYTE:
... | [
"public",
"static",
"Object",
"getPrimitiveValue",
"(",
"String",
"value",
",",
"PrimitiveCategory",
"primitiveCategory",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"try",
"{",
"switch",
"(",
"primitiveCategory",
")",
"{",
"case",
"BOOLEAN",
":",
... | Converts the string value to the java object for the given primitive category
@param value
the value
@param primitiveCategory
the primitive category
@return the java object | [
"Converts",
"the",
"string",
"value",
"to",
"the",
"java",
"object",
"for",
"the",
"given",
"primitive",
"category"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/XmlUtils.java#L41-L68 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/objectinspector/XmlObjectInspectorFactory.java | XmlObjectInspectorFactory.getStandardJavaObjectInspectorFromTypeInfo | public static ObjectInspector getStandardJavaObjectInspectorFromTypeInfo(TypeInfo typeInfo, XmlProcessor xmlProcessor) {
switch (typeInfo.getCategory()) {
case PRIMITIVE: {
return PrimitiveObjectInspectorFactory.getPrimitiveJavaObjectInspector(((PrimitiveTypeInfo) typeInfo).getPrimit... | java | public static ObjectInspector getStandardJavaObjectInspectorFromTypeInfo(TypeInfo typeInfo, XmlProcessor xmlProcessor) {
switch (typeInfo.getCategory()) {
case PRIMITIVE: {
return PrimitiveObjectInspectorFactory.getPrimitiveJavaObjectInspector(((PrimitiveTypeInfo) typeInfo).getPrimit... | [
"public",
"static",
"ObjectInspector",
"getStandardJavaObjectInspectorFromTypeInfo",
"(",
"TypeInfo",
"typeInfo",
",",
"XmlProcessor",
"xmlProcessor",
")",
"{",
"switch",
"(",
"typeInfo",
".",
"getCategory",
"(",
")",
")",
"{",
"case",
"PRIMITIVE",
":",
"{",
"return... | Returns the standard java object inspector
@param typeInfo
the type info
@param xmlProcessor
the XML processor
@return the standard java object inspector | [
"Returns",
"the",
"standard",
"java",
"object",
"inspector"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/objectinspector/XmlObjectInspectorFactory.java#L53-L85 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/objectinspector/XmlObjectInspectorFactory.java | XmlObjectInspectorFactory.getStandardStructObjectInspector | public static StructObjectInspector getStandardStructObjectInspector(List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors,
XmlProcessor xmlProcessor) {
return new XmlStructObjectInspector(structFieldNames, structFieldObjectInspectors, xmlProcessor);
} | java | public static StructObjectInspector getStandardStructObjectInspector(List<String> structFieldNames,
List<ObjectInspector> structFieldObjectInspectors,
XmlProcessor xmlProcessor) {
return new XmlStructObjectInspector(structFieldNames, structFieldObjectInspectors, xmlProcessor);
} | [
"public",
"static",
"StructObjectInspector",
"getStandardStructObjectInspector",
"(",
"List",
"<",
"String",
">",
"structFieldNames",
",",
"List",
"<",
"ObjectInspector",
">",
"structFieldObjectInspectors",
",",
"XmlProcessor",
"xmlProcessor",
")",
"{",
"return",
"new",
... | Returns the struct object inspector
@param structFieldNames
the field names
@param structFieldObjectInspectors
the object inspectors
@param xmlProcessor
the XML processor
@return the struct object inspector | [
"Returns",
"the",
"struct",
"object",
"inspector"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/objectinspector/XmlObjectInspectorFactory.java#L98-L102 | train |
dvasilen/Hive-XML-SerDe | src/main/java/com/ibm/spss/hive/serde2/xml/processor/XmlTransformer.java | XmlTransformer.transform | public void transform(XmlNode node, StringBuilder builder) {
switch (node.getType()) {
case XmlNode.ELEMENT_NODE: {
builder.append("<");
builder.append(node.getName());
for (XmlNode attribute : node.getAttributes().values()) {
trans... | java | public void transform(XmlNode node, StringBuilder builder) {
switch (node.getType()) {
case XmlNode.ELEMENT_NODE: {
builder.append("<");
builder.append(node.getName());
for (XmlNode attribute : node.getAttributes().values()) {
trans... | [
"public",
"void",
"transform",
"(",
"XmlNode",
"node",
",",
"StringBuilder",
"builder",
")",
"{",
"switch",
"(",
"node",
".",
"getType",
"(",
")",
")",
"{",
"case",
"XmlNode",
".",
"ELEMENT_NODE",
":",
"{",
"builder",
".",
"append",
"(",
"\"<\"",
")",
... | Transforms the XML node into the string
@param node
the node to transform
@param builder
the string builder | [
"Transforms",
"the",
"XML",
"node",
"into",
"the",
"string"
] | 2a7a184b2cfaeb63008529a9851cd72edb8025d9 | https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/XmlTransformer.java#L33-L62 | train |
sprylab/texturevideoview | library/src/main/java/com/sprylab/android/widget/TextureVideoView.java | TextureVideoView.setVideoURI | public void setVideoURI(Uri uri, Map<String, String> headers) {
mUri = uri;
mHeaders = headers;
mSeekWhenPrepared = 0;
openVideo();
requestLayout();
invalidate();
} | java | public void setVideoURI(Uri uri, Map<String, String> headers) {
mUri = uri;
mHeaders = headers;
mSeekWhenPrepared = 0;
openVideo();
requestLayout();
invalidate();
} | [
"public",
"void",
"setVideoURI",
"(",
"Uri",
"uri",
",",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"mUri",
"=",
"uri",
";",
"mHeaders",
"=",
"headers",
";",
"mSeekWhenPrepared",
"=",
"0",
";",
"openVideo",
"(",
")",
";",
"requestLa... | Sets video URI using specific headers.
@param uri the URI of the video.
@param headers the headers for the URI request.
Note that the cross domain redirection is allowed by default, but that can be
changed with key/value pairs through the headers parameter with
"android-allow-cross-domain-redirect" as the key and ... | [
"Sets",
"video",
"URI",
"using",
"specific",
"headers",
"."
] | 4c3665b8342f1d7c13f84acd1d628db88a2bedf6 | https://github.com/sprylab/texturevideoview/blob/4c3665b8342f1d7c13f84acd1d628db88a2bedf6/library/src/main/java/com/sprylab/android/widget/TextureVideoView.java#L252-L259 | train |
edwardcapriolo/gossip | src/main/java/com/google/code/gossip/StartupSettings.java | StartupSettings.fromJSONFile | public static StartupSettings fromJSONFile(File jsonFile) throws JSONException,
FileNotFoundException, IOException {
// Read the file to a String.
StringBuffer buffer = new StringBuffer();
try (BufferedReader br = new BufferedReader(new FileReader(jsonFile)) ){
String line;
while ((lin... | java | public static StartupSettings fromJSONFile(File jsonFile) throws JSONException,
FileNotFoundException, IOException {
// Read the file to a String.
StringBuffer buffer = new StringBuffer();
try (BufferedReader br = new BufferedReader(new FileReader(jsonFile)) ){
String line;
while ((lin... | [
"public",
"static",
"StartupSettings",
"fromJSONFile",
"(",
"File",
"jsonFile",
")",
"throws",
"JSONException",
",",
"FileNotFoundException",
",",
"IOException",
"{",
"// Read the file to a String.",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
... | Parse the settings for the gossip service from a JSON file.
@param jsonFile
The file object which refers to the JSON config file.
@return The StartupSettings object with the settings from the config file.
@throws JSONException
Thrown when the file is not well-formed JSON.
@throws FileNotFoundException
Thrown when the ... | [
"Parse",
"the",
"settings",
"for",
"the",
"gossip",
"service",
"from",
"a",
"JSON",
"file",
"."
] | ac87301458c7ba4eb7d952046894ebf42ffb0518 | https://github.com/edwardcapriolo/gossip/blob/ac87301458c7ba4eb7d952046894ebf42ffb0518/src/main/java/com/google/code/gossip/StartupSettings.java#L172-L211 | train |
edwardcapriolo/gossip | src/main/java/com/google/code/gossip/manager/impl/SendMembersActiveGossipThread.java | SendMembersActiveGossipThread.sendMembershipList | protected void sendMembershipList(LocalGossipMember me, List<LocalGossipMember> memberList) {
GossipService.LOGGER.debug("Send sendMembershipList() is called.");
me.setHeartbeat(System.currentTimeMillis());
LocalGossipMember member = selectPartner(memberList);
if (member == null) {
return;
}
... | java | protected void sendMembershipList(LocalGossipMember me, List<LocalGossipMember> memberList) {
GossipService.LOGGER.debug("Send sendMembershipList() is called.");
me.setHeartbeat(System.currentTimeMillis());
LocalGossipMember member = selectPartner(memberList);
if (member == null) {
return;
}
... | [
"protected",
"void",
"sendMembershipList",
"(",
"LocalGossipMember",
"me",
",",
"List",
"<",
"LocalGossipMember",
">",
"memberList",
")",
"{",
"GossipService",
".",
"LOGGER",
".",
"debug",
"(",
"\"Send sendMembershipList() is called.\"",
")",
";",
"me",
".",
"setHea... | Performs the sending of the membership list, after we have incremented our own heartbeat. | [
"Performs",
"the",
"sending",
"of",
"the",
"membership",
"list",
"after",
"we",
"have",
"incremented",
"our",
"own",
"heartbeat",
"."
] | ac87301458c7ba4eb7d952046894ebf42ffb0518 | https://github.com/edwardcapriolo/gossip/blob/ac87301458c7ba4eb7d952046894ebf42ffb0518/src/main/java/com/google/code/gossip/manager/impl/SendMembersActiveGossipThread.java#L57-L85 | train |
edwardcapriolo/gossip | src/main/java/com/google/code/gossip/manager/GossipManager.java | GossipManager.run | public void run() {
for (LocalGossipMember member : members.keySet()) {
if (member != me) {
member.startTimeoutTimer();
}
}
try {
passiveGossipThread = passiveGossipThreadClass.getConstructor(GossipManager.class)
.newInstance(this);
gossipThreadExecutor.execute(... | java | public void run() {
for (LocalGossipMember member : members.keySet()) {
if (member != me) {
member.startTimeoutTimer();
}
}
try {
passiveGossipThread = passiveGossipThreadClass.getConstructor(GossipManager.class)
.newInstance(this);
gossipThreadExecutor.execute(... | [
"public",
"void",
"run",
"(",
")",
"{",
"for",
"(",
"LocalGossipMember",
"member",
":",
"members",
".",
"keySet",
"(",
")",
")",
"{",
"if",
"(",
"member",
"!=",
"me",
")",
"{",
"member",
".",
"startTimeoutTimer",
"(",
")",
";",
"}",
"}",
"try",
"{"... | Starts the client. Specifically, start the various cycles for this protocol. Start the gossip
thread and start the receiver thread. | [
"Starts",
"the",
"client",
".",
"Specifically",
"start",
"the",
"various",
"cycles",
"for",
"this",
"protocol",
".",
"Start",
"the",
"gossip",
"thread",
"and",
"start",
"the",
"receiver",
"thread",
"."
] | ac87301458c7ba4eb7d952046894ebf42ffb0518 | https://github.com/edwardcapriolo/gossip/blob/ac87301458c7ba4eb7d952046894ebf42ffb0518/src/main/java/com/google/code/gossip/manager/GossipManager.java#L168-L194 | train |
edwardcapriolo/gossip | src/main/java/com/google/code/gossip/manager/GossipManager.java | GossipManager.shutdown | public void shutdown() {
gossipServiceRunning.set(false);
gossipThreadExecutor.shutdown();
if (passiveGossipThread != null) {
passiveGossipThread.shutdown();
}
if (activeGossipThread != null) {
activeGossipThread.shutdown();
}
try {
boolean result = gossipThreadExecutor.awa... | java | public void shutdown() {
gossipServiceRunning.set(false);
gossipThreadExecutor.shutdown();
if (passiveGossipThread != null) {
passiveGossipThread.shutdown();
}
if (activeGossipThread != null) {
activeGossipThread.shutdown();
}
try {
boolean result = gossipThreadExecutor.awa... | [
"public",
"void",
"shutdown",
"(",
")",
"{",
"gossipServiceRunning",
".",
"set",
"(",
"false",
")",
";",
"gossipThreadExecutor",
".",
"shutdown",
"(",
")",
";",
"if",
"(",
"passiveGossipThread",
"!=",
"null",
")",
"{",
"passiveGossipThread",
".",
"shutdown",
... | Shutdown the gossip service. | [
"Shutdown",
"the",
"gossip",
"service",
"."
] | ac87301458c7ba4eb7d952046894ebf42ffb0518 | https://github.com/edwardcapriolo/gossip/blob/ac87301458c7ba4eb7d952046894ebf42ffb0518/src/main/java/com/google/code/gossip/manager/GossipManager.java#L199-L216 | train |
jeevatkm/excelReader | src/main/java/com/myjeeva/poi/ExcelWorkSheetHandler.java | ExcelWorkSheetHandler.isObjectHasValue | private boolean isObjectHasValue(Object targetObj) {
for (Map.Entry<String, String> entry : cellMapping.entrySet()) {
if (!StringUtils.equalsIgnoreCase(HEADER_KEY, entry.getKey())) {
if (StringUtils.isNotBlank(getPropertyValue(targetObj, entry.getValue()))) {
return true;
}
}
... | java | private boolean isObjectHasValue(Object targetObj) {
for (Map.Entry<String, String> entry : cellMapping.entrySet()) {
if (!StringUtils.equalsIgnoreCase(HEADER_KEY, entry.getKey())) {
if (StringUtils.isNotBlank(getPropertyValue(targetObj, entry.getValue()))) {
return true;
}
}
... | [
"private",
"boolean",
"isObjectHasValue",
"(",
"Object",
"targetObj",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
":",
"cellMapping",
".",
"entrySet",
"(",
")",
")",
"{",
"if",
"(",
"!",
"StringUtils",
".",
"e... | To check generic object of T has a minimum one value assigned or not | [
"To",
"check",
"generic",
"object",
"of",
"T",
"has",
"a",
"minimum",
"one",
"value",
"assigned",
"or",
"not"
] | 87f451474e3e8863688d19269bcd2bcc56873e87 | https://github.com/jeevatkm/excelReader/blob/87f451474e3e8863688d19269bcd2bcc56873e87/src/main/java/com/myjeeva/poi/ExcelWorkSheetHandler.java#L239-L248 | train |
jeevatkm/excelReader | src/main/java/com/myjeeva/poi/ExcelReader.java | ExcelReader.readSheet | private void readSheet(StylesTable styles, ReadOnlySharedStringsTable sharedStringsTable,
InputStream sheetInputStream) throws IOException, ParserConfigurationException, SAXException {
SAXParserFactory saxFactory = SAXParserFactory.newInstance();
XMLReader sheetParser = saxFactory.newSAXParser().getXMLRe... | java | private void readSheet(StylesTable styles, ReadOnlySharedStringsTable sharedStringsTable,
InputStream sheetInputStream) throws IOException, ParserConfigurationException, SAXException {
SAXParserFactory saxFactory = SAXParserFactory.newInstance();
XMLReader sheetParser = saxFactory.newSAXParser().getXMLRe... | [
"private",
"void",
"readSheet",
"(",
"StylesTable",
"styles",
",",
"ReadOnlySharedStringsTable",
"sharedStringsTable",
",",
"InputStream",
"sheetInputStream",
")",
"throws",
"IOException",
",",
"ParserConfigurationException",
",",
"SAXException",
"{",
"SAXParserFactory",
"s... | Parses the content of one sheet using the specified styles and shared-strings tables.
@param styles a {@link StylesTable} object
@param sharedStringsTable a {@link ReadOnlySharedStringsTable} object
@param sheetInputStream a {@link InputStream} object
@throws IOException
@throws ParserConfigurationException
@throws SA... | [
"Parses",
"the",
"content",
"of",
"one",
"sheet",
"using",
"the",
"specified",
"styles",
"and",
"shared",
"-",
"strings",
"tables",
"."
] | 87f451474e3e8863688d19269bcd2bcc56873e87 | https://github.com/jeevatkm/excelReader/blob/87f451474e3e8863688d19269bcd2bcc56873e87/src/main/java/com/myjeeva/poi/ExcelReader.java#L188-L199 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.getProgramProperty | private static String getProgramProperty(String property) {
if (System.getProperty(property) != null) {
return System.getProperty(property).trim();
}
Properties prop = new Properties();
try (InputStream input = new FileInputStream(SELENIFIED)) {
prop.load(input);
... | java | private static String getProgramProperty(String property) {
if (System.getProperty(property) != null) {
return System.getProperty(property).trim();
}
Properties prop = new Properties();
try (InputStream input = new FileInputStream(SELENIFIED)) {
prop.load(input);
... | [
"private",
"static",
"String",
"getProgramProperty",
"(",
"String",
"property",
")",
"{",
"if",
"(",
"System",
".",
"getProperty",
"(",
"property",
")",
"!=",
"null",
")",
"{",
"return",
"System",
".",
"getProperty",
"(",
"property",
")",
".",
"trim",
"(",... | Retrieves the specified program property. if it exists from the system properties, that is returned, overridding
all other values. Otherwise, if it exists from the properties file, that is returned, otherwise, null is returned
@param property - what property value to return
@return String: the property value, null if ... | [
"Retrieves",
"the",
"specified",
"program",
"property",
".",
"if",
"it",
"exists",
"from",
"the",
"system",
"properties",
"that",
"is",
"returned",
"overridding",
"all",
"other",
"values",
".",
"Otherwise",
"if",
"it",
"exists",
"from",
"the",
"properties",
"f... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L77-L92 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.generatePDF | public static boolean generatePDF() {
String generatePDF = getProgramProperty(GENERATE_PDF);
if (generatePDF == null) {
return false;
}
if ("".equals(generatePDF)) {
return true;
}
return "true".equalsIgnoreCase(generatePDF);
} | java | public static boolean generatePDF() {
String generatePDF = getProgramProperty(GENERATE_PDF);
if (generatePDF == null) {
return false;
}
if ("".equals(generatePDF)) {
return true;
}
return "true".equalsIgnoreCase(generatePDF);
} | [
"public",
"static",
"boolean",
"generatePDF",
"(",
")",
"{",
"String",
"generatePDF",
"=",
"getProgramProperty",
"(",
"GENERATE_PDF",
")",
";",
"if",
"(",
"generatePDF",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"\"\"",
".",
"equals",... | Determines if we are supposed to generate a pdf of the results or not
@return boolean: generate a pdf or not | [
"Determines",
"if",
"we",
"are",
"supposed",
"to",
"generate",
"a",
"pdf",
"of",
"the",
"results",
"or",
"not"
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L99-L108 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.packageResults | public static boolean packageResults() {
String packageResults = getProgramProperty(PACKAGE_RESULTS);
if (packageResults == null) {
return false;
}
if ("".equals(packageResults)) {
return true;
}
return "true".equalsIgnoreCase(packageResults);
... | java | public static boolean packageResults() {
String packageResults = getProgramProperty(PACKAGE_RESULTS);
if (packageResults == null) {
return false;
}
if ("".equals(packageResults)) {
return true;
}
return "true".equalsIgnoreCase(packageResults);
... | [
"public",
"static",
"boolean",
"packageResults",
"(",
")",
"{",
"String",
"packageResults",
"=",
"getProgramProperty",
"(",
"PACKAGE_RESULTS",
")",
";",
"if",
"(",
"packageResults",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"\"\"",
".",... | Determines if we are supposed to zip up the results or not
@return boolean: zip up the results or not | [
"Determines",
"if",
"we",
"are",
"supposed",
"to",
"zip",
"up",
"the",
"results",
"or",
"not"
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L115-L124 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.getProxy | public static String getProxy() throws InvalidProxyException {
String proxy = getProgramProperty(PROXY);
if (proxy == null) {
throw new InvalidProxyException(PROXY_ISNT_SET);
}
String[] proxyParts = proxy.split(":");
if (proxyParts.length != 2) {
throw new... | java | public static String getProxy() throws InvalidProxyException {
String proxy = getProgramProperty(PROXY);
if (proxy == null) {
throw new InvalidProxyException(PROXY_ISNT_SET);
}
String[] proxyParts = proxy.split(":");
if (proxyParts.length != 2) {
throw new... | [
"public",
"static",
"String",
"getProxy",
"(",
")",
"throws",
"InvalidProxyException",
"{",
"String",
"proxy",
"=",
"getProgramProperty",
"(",
"PROXY",
")",
";",
"if",
"(",
"proxy",
"==",
"null",
")",
"{",
"throw",
"new",
"InvalidProxyException",
"(",
"PROXY_I... | Retrieves the proxy property if it is set. This could be to something local, or in the cloud.
Provide the protocol, address, and port
@return String: the set proxy address, null if none are set | [
"Retrieves",
"the",
"proxy",
"property",
"if",
"it",
"is",
"set",
".",
"This",
"could",
"be",
"to",
"something",
"local",
"or",
"in",
"the",
"cloud",
".",
"Provide",
"the",
"protocol",
"address",
"and",
"port"
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L168-L183 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.getAppURL | public static String getAppURL(String clazz, ITestContext context) throws InvalidHTTPException {
String appURL = checkAppURL(null, (String) context.getAttribute(clazz + APP_URL), "The provided app via test case setup '");
Properties prop = new Properties();
try (InputStream input = new FileInput... | java | public static String getAppURL(String clazz, ITestContext context) throws InvalidHTTPException {
String appURL = checkAppURL(null, (String) context.getAttribute(clazz + APP_URL), "The provided app via test case setup '");
Properties prop = new Properties();
try (InputStream input = new FileInput... | [
"public",
"static",
"String",
"getAppURL",
"(",
"String",
"clazz",
",",
"ITestContext",
"context",
")",
"throws",
"InvalidHTTPException",
"{",
"String",
"appURL",
"=",
"checkAppURL",
"(",
"null",
",",
"(",
"String",
")",
"context",
".",
"getAttribute",
"(",
"c... | Obtains the application under test, as a URL. If the site was provided as
a system property, that value will override whatever was set in the
particular test suite. If no site was set, null will be returned, which
will causes the tests to error out
@param clazz - the test suite class, used for making threadsafe stor... | [
"Obtains",
"the",
"application",
"under",
"test",
"as",
"a",
"URL",
".",
"If",
"the",
"site",
"was",
"provided",
"as",
"a",
"system",
"property",
"that",
"value",
"will",
"override",
"whatever",
"was",
"set",
"in",
"the",
"particular",
"test",
"suite",
"."... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L207-L221 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.checkAppURL | private static String checkAppURL(String originalAppURL, String newAppURL, String s) {
if (newAppURL != null && !"".equals(newAppURL)) {
if (!newAppURL.toLowerCase().startsWith("http") && !newAppURL.toLowerCase().startsWith("file")) {
newAppURL = "http://" + newAppURL;
}
... | java | private static String checkAppURL(String originalAppURL, String newAppURL, String s) {
if (newAppURL != null && !"".equals(newAppURL)) {
if (!newAppURL.toLowerCase().startsWith("http") && !newAppURL.toLowerCase().startsWith("file")) {
newAppURL = "http://" + newAppURL;
}
... | [
"private",
"static",
"String",
"checkAppURL",
"(",
"String",
"originalAppURL",
",",
"String",
"newAppURL",
",",
"String",
"s",
")",
"{",
"if",
"(",
"newAppURL",
"!=",
"null",
"&&",
"!",
"\"\"",
".",
"equals",
"(",
"newAppURL",
")",
")",
"{",
"if",
"(",
... | A helper method to getAppURL, which checks the provided URL, and if it is valid, overrides the initially
provided one.
@param originalAppURL - the original and currently set app url
@param newAppURL - the new app url to check
@param s - the location being checked (for reporting)
@return String: the m... | [
"A",
"helper",
"method",
"to",
"getAppURL",
"which",
"checks",
"the",
"provided",
"URL",
"and",
"if",
"it",
"is",
"valid",
"overrides",
"the",
"initially",
"provided",
"one",
"."
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L232-L245 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.getBrowser | public static String getBrowser() {
String browser = getProgramProperty(BROWSER);
if (browser == null || "".equals(browser)) {
browser = Browser.BrowserName.HTMLUNIT.toString();
}
return browser;
} | java | public static String getBrowser() {
String browser = getProgramProperty(BROWSER);
if (browser == null || "".equals(browser)) {
browser = Browser.BrowserName.HTMLUNIT.toString();
}
return browser;
} | [
"public",
"static",
"String",
"getBrowser",
"(",
")",
"{",
"String",
"browser",
"=",
"getProgramProperty",
"(",
"BROWSER",
")",
";",
"if",
"(",
"browser",
"==",
"null",
"||",
"\"\"",
".",
"equals",
"(",
"browser",
")",
")",
"{",
"browser",
"=",
"Browser"... | Retrieves the browser property if it is set. This can be a single browser name, or browser details. If it is
not set, HTMLUnit will be returned as the default browser to use
@return String: the set browser | [
"Retrieves",
"the",
"browser",
"property",
"if",
"it",
"is",
"set",
".",
"This",
"can",
"be",
"a",
"single",
"browser",
"name",
"or",
"browser",
"details",
".",
"If",
"it",
"is",
"not",
"set",
"HTMLUnit",
"will",
"be",
"returned",
"as",
"the",
"default",... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L253-L259 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.runHeadless | public static boolean runHeadless() {
String headless = getProgramProperty(HEADLESS);
if (headless == null) {
return false;
}
if ("".equals(headless)) {
return true;
}
return "true".equalsIgnoreCase(headless);
} | java | public static boolean runHeadless() {
String headless = getProgramProperty(HEADLESS);
if (headless == null) {
return false;
}
if ("".equals(headless)) {
return true;
}
return "true".equalsIgnoreCase(headless);
} | [
"public",
"static",
"boolean",
"runHeadless",
"(",
")",
"{",
"String",
"headless",
"=",
"getProgramProperty",
"(",
"HEADLESS",
")",
";",
"if",
"(",
"headless",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"\"\"",
".",
"equals",
"(",
... | Determines if the headless parameter was set, to have the browser run in headless mode. This only
can be used for Chrome and Firefox.
@return boolean: is headless set or not | [
"Determines",
"if",
"the",
"headless",
"parameter",
"was",
"set",
"to",
"have",
"the",
"browser",
"run",
"in",
"headless",
"mode",
".",
"This",
"only",
"can",
"be",
"used",
"for",
"Chrome",
"and",
"Firefox",
"."
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L267-L276 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/utilities/Property.java | Property.getOptions | public static String getOptions() throws InvalidBrowserOptionsException {
String options = getProgramProperty(OPTIONS);
if (options == null || "".equals(options)) {
throw new InvalidBrowserOptionsException("Browser options aren't set");
}
return options;
} | java | public static String getOptions() throws InvalidBrowserOptionsException {
String options = getProgramProperty(OPTIONS);
if (options == null || "".equals(options)) {
throw new InvalidBrowserOptionsException("Browser options aren't set");
}
return options;
} | [
"public",
"static",
"String",
"getOptions",
"(",
")",
"throws",
"InvalidBrowserOptionsException",
"{",
"String",
"options",
"=",
"getProgramProperty",
"(",
"OPTIONS",
")",
";",
"if",
"(",
"options",
"==",
"null",
"||",
"\"\"",
".",
"equals",
"(",
"options",
")... | Retrieves the set options
@return String: the options, null if none are set | [
"Retrieves",
"the",
"set",
"options"
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L293-L299 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java | WaitForState.present | public void present(double seconds) {
try {
double timeTook = elementPresent(seconds);
checkPresent(seconds, timeTook);
} catch (TimeoutException e) {
checkPresent(seconds, seconds);
}
} | java | public void present(double seconds) {
try {
double timeTook = elementPresent(seconds);
checkPresent(seconds, timeTook);
} catch (TimeoutException e) {
checkPresent(seconds, seconds);
}
} | [
"public",
"void",
"present",
"(",
"double",
"seconds",
")",
"{",
"try",
"{",
"double",
"timeTook",
"=",
"elementPresent",
"(",
"seconds",
")",
";",
"checkPresent",
"(",
"seconds",
",",
"timeTook",
")",
";",
"}",
"catch",
"(",
"TimeoutException",
"e",
")",
... | Waits for the element to be present. The provided wait time will be used
and if the element isn't present after that time, it will fail, and log
the issue with a screenshot for traceability and added debugging support.
@param seconds - how many seconds to wait for | [
"Waits",
"for",
"the",
"element",
"to",
"be",
"present",
".",
"The",
"provided",
"wait",
"time",
"will",
"be",
"used",
"and",
"if",
"the",
"element",
"isn",
"t",
"present",
"after",
"that",
"time",
"it",
"will",
"fail",
"and",
"log",
"the",
"issue",
"w... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java#L194-L201 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java | WaitForState.notPresent | public void notPresent(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) seconds, DEFAULT_POLLING_INTERVAL);
wait.until(ExpectedConditions.not(ExpectedConditions.presenceOfAllElem... | java | public void notPresent(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) seconds, DEFAULT_POLLING_INTERVAL);
wait.until(ExpectedConditions.not(ExpectedConditions.presenceOfAllElem... | [
"public",
"void",
"notPresent",
"(",
"double",
"seconds",
")",
"{",
"double",
"end",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"(",
"seconds",
"*",
"1000",
")",
";",
"try",
"{",
"WebDriverWait",
"wait",
"=",
"new",
"WebDriverWait",
"(",
"el... | Waits for the element to not be present. The provided wait time will be used
and if the element isn't present after that time, it will fail, and log
the issue with a screenshot for traceability and added debugging support.
@param seconds - how many seconds to wait for | [
"Waits",
"for",
"the",
"element",
"to",
"not",
"be",
"present",
".",
"The",
"provided",
"wait",
"time",
"will",
"be",
"used",
"and",
"if",
"the",
"element",
"isn",
"t",
"present",
"after",
"that",
"time",
"it",
"will",
"fail",
"and",
"log",
"the",
"iss... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java#L210-L220 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java | WaitForState.displayed | public void displayed(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
wai... | java | public void displayed(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
wai... | [
"public",
"void",
"displayed",
"(",
"double",
"seconds",
")",
"{",
"double",
"end",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"(",
"seconds",
"*",
"1000",
")",
";",
"try",
"{",
"double",
"timeTook",
"=",
"elementPresent",
"(",
"seconds",
")... | Waits for the element to be displayed. The provided wait time will be used
and if the element isn't present after that time, it will fail, and log
the issue with a screenshot for traceability and added debugging support.
@param seconds - how many seconds to wait for | [
"Waits",
"for",
"the",
"element",
"to",
"be",
"displayed",
".",
"The",
"provided",
"wait",
"time",
"will",
"be",
"used",
"and",
"if",
"the",
"element",
"isn",
"t",
"present",
"after",
"that",
"time",
"it",
"will",
"fail",
"and",
"log",
"the",
"issue",
... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java#L229-L240 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java | WaitForState.notDisplayed | public void notDisplayed(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
... | java | public void notDisplayed(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
... | [
"public",
"void",
"notDisplayed",
"(",
"double",
"seconds",
")",
"{",
"double",
"end",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"(",
"seconds",
"*",
"1000",
")",
";",
"try",
"{",
"double",
"timeTook",
"=",
"elementPresent",
"(",
"seconds",
... | Waits for the element to not be displayed. The provided wait time will be used
and if the element isn't present after that time, it will fail, and log
the issue with a screenshot for traceability and added debugging support.
@param seconds - how many seconds to wait for | [
"Waits",
"for",
"the",
"element",
"to",
"not",
"be",
"displayed",
".",
"The",
"provided",
"wait",
"time",
"will",
"be",
"used",
"and",
"if",
"the",
"element",
"isn",
"t",
"present",
"after",
"that",
"time",
"it",
"will",
"fail",
"and",
"log",
"the",
"i... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java#L249-L260 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java | WaitForState.checked | public void checked(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
elementPresent(seconds);
while (!element.is().checked() && System.currentTimeMillis() < end) ;
double timeTook = Math.min((seconds * 1000) - (end - System.currentTi... | java | public void checked(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
elementPresent(seconds);
while (!element.is().checked() && System.currentTimeMillis() < end) ;
double timeTook = Math.min((seconds * 1000) - (end - System.currentTi... | [
"public",
"void",
"checked",
"(",
"double",
"seconds",
")",
"{",
"double",
"end",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"(",
"seconds",
"*",
"1000",
")",
";",
"try",
"{",
"elementPresent",
"(",
"seconds",
")",
";",
"while",
"(",
"!",
... | Waits for the element to be checked. The provided wait time will be used
and if the element isn't present after that time, it will fail, and log
the issue with a screenshot for traceability and added debugging support.
@param seconds - how many seconds to wait for | [
"Waits",
"for",
"the",
"element",
"to",
"be",
"checked",
".",
"The",
"provided",
"wait",
"time",
"will",
"be",
"used",
"and",
"if",
"the",
"element",
"isn",
"t",
"present",
"after",
"that",
"time",
"it",
"will",
"fail",
"and",
"log",
"the",
"issue",
"w... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java#L269-L279 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java | WaitForState.editable | public void editable(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
elementPresent(seconds);
while (!element.is().editable() && System.currentTimeMillis() < end) ;
double timeTook = Math.min((seconds * 1000) - (end - System.current... | java | public void editable(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
elementPresent(seconds);
while (!element.is().editable() && System.currentTimeMillis() < end) ;
double timeTook = Math.min((seconds * 1000) - (end - System.current... | [
"public",
"void",
"editable",
"(",
"double",
"seconds",
")",
"{",
"double",
"end",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"(",
"seconds",
"*",
"1000",
")",
";",
"try",
"{",
"elementPresent",
"(",
"seconds",
")",
";",
"while",
"(",
"!",... | Waits for the element to be editable. The provided wait time will be used
and if the element isn't present after that time, it will fail, and log
the issue with a screenshot for traceability and added debugging support.
If the element isn't an input, this will
constitute a failure, same as it not being editable.
@para... | [
"Waits",
"for",
"the",
"element",
"to",
"be",
"editable",
".",
"The",
"provided",
"wait",
"time",
"will",
"be",
"used",
"and",
"if",
"the",
"element",
"isn",
"t",
"present",
"after",
"that",
"time",
"it",
"will",
"fail",
"and",
"log",
"the",
"issue",
"... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java#L309-L319 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java | WaitForState.enabled | public void enabled(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
wait.... | java | public void enabled(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
wait.... | [
"public",
"void",
"enabled",
"(",
"double",
"seconds",
")",
"{",
"double",
"end",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"(",
"seconds",
"*",
"1000",
")",
";",
"try",
"{",
"double",
"timeTook",
"=",
"elementPresent",
"(",
"seconds",
")",... | Waits for the element to be enabled. The provided wait time will be used
and if the element isn't present after that time, it will fail, and log
the issue with a screenshot for traceability and added debugging support.
@param seconds - how many seconds to wait for | [
"Waits",
"for",
"the",
"element",
"to",
"be",
"enabled",
".",
"The",
"provided",
"wait",
"time",
"will",
"be",
"used",
"and",
"if",
"the",
"element",
"isn",
"t",
"present",
"after",
"that",
"time",
"it",
"will",
"fail",
"and",
"log",
"the",
"issue",
"w... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java#L349-L360 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java | WaitForState.notEnabled | public void notEnabled(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
wa... | java | public void notEnabled(double seconds) {
double end = System.currentTimeMillis() + (seconds * 1000);
try {
double timeTook = elementPresent(seconds);
WebDriverWait wait = new WebDriverWait(element.getDriver(), (long) (seconds - timeTook), DEFAULT_POLLING_INTERVAL);
wa... | [
"public",
"void",
"notEnabled",
"(",
"double",
"seconds",
")",
"{",
"double",
"end",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
"+",
"(",
"seconds",
"*",
"1000",
")",
";",
"try",
"{",
"double",
"timeTook",
"=",
"elementPresent",
"(",
"seconds",
"... | Waits for the element to not be enabled. The provided wait time will be used
and if the element isn't present after that time, it will fail, and log
the issue with a screenshot for traceability and added debugging support.
@param seconds - how many seconds to wait for | [
"Waits",
"for",
"the",
"element",
"to",
"not",
"be",
"enabled",
".",
"The",
"provided",
"wait",
"time",
"will",
"be",
"used",
"and",
"if",
"the",
"element",
"isn",
"t",
"present",
"after",
"that",
"time",
"it",
"will",
"fail",
"and",
"log",
"the",
"iss... | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/check/wait/WaitForState.java#L369-L380 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/services/Call.java | Call.call | private Response call(Method method, String endpoint, Request params, File inputFile) {
StringBuilder action = new StringBuilder();
action.append("Making <i>");
action.append(method.toString());
action.append("</i> call to <i>");
action.append(http.getServiceBaseUrl()).append(end... | java | private Response call(Method method, String endpoint, Request params, File inputFile) {
StringBuilder action = new StringBuilder();
action.append("Making <i>");
action.append(method.toString());
action.append("</i> call to <i>");
action.append(http.getServiceBaseUrl()).append(end... | [
"private",
"Response",
"call",
"(",
"Method",
"method",
",",
"String",
"endpoint",
",",
"Request",
"params",
",",
"File",
"inputFile",
")",
"{",
"StringBuilder",
"action",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"action",
".",
"append",
"(",
"\"Making <i... | Performs an http call and writes the call and response information to the
output file
@param method - what http method call is being made. should be in all caps
@param endpoint - the endpoint of the service under test
@param params - the parameters to be passed to the endpoint for the service
call
@return Respon... | [
"Performs",
"an",
"http",
"call",
"and",
"writes",
"the",
"call",
"and",
"response",
"information",
"to",
"the",
"output",
"file"
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/services/Call.java#L222-L262 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/Capabilities.java | Capabilities.setupProxy | public void setupProxy() throws InvalidProxyException {
// are we running through a proxy
if (Property.isProxySet()) {
// set the proxy information
Proxy proxy = new Proxy();
proxy.setHttpProxy(Property.getProxy());
desiredCapabilities.setCapability(Capabi... | java | public void setupProxy() throws InvalidProxyException {
// are we running through a proxy
if (Property.isProxySet()) {
// set the proxy information
Proxy proxy = new Proxy();
proxy.setHttpProxy(Property.getProxy());
desiredCapabilities.setCapability(Capabi... | [
"public",
"void",
"setupProxy",
"(",
")",
"throws",
"InvalidProxyException",
"{",
"// are we running through a proxy",
"if",
"(",
"Property",
".",
"isProxySet",
"(",
")",
")",
"{",
"// set the proxy information",
"Proxy",
"proxy",
"=",
"new",
"Proxy",
"(",
")",
";... | Obtains the set system values for the proxy, and adds them to the desired
desiredCapabilities | [
"Obtains",
"the",
"set",
"system",
"values",
"for",
"the",
"proxy",
"and",
"adds",
"them",
"to",
"the",
"desired",
"desiredCapabilities"
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/Capabilities.java#L174-L182 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/Capabilities.java | Capabilities.setupDriver | public WebDriver setupDriver() throws InvalidBrowserException {
WebDriver driver;
// check the browser
switch (browser.getName()) {
case HTMLUNIT:
System.getProperties().put("org.apache.commons.logging.simplelog.defaultlog", "fatal");
java.util.logging... | java | public WebDriver setupDriver() throws InvalidBrowserException {
WebDriver driver;
// check the browser
switch (browser.getName()) {
case HTMLUNIT:
System.getProperties().put("org.apache.commons.logging.simplelog.defaultlog", "fatal");
java.util.logging... | [
"public",
"WebDriver",
"setupDriver",
"(",
")",
"throws",
"InvalidBrowserException",
"{",
"WebDriver",
"driver",
";",
"// check the browser",
"switch",
"(",
"browser",
".",
"getName",
"(",
")",
")",
"{",
"case",
"HTMLUNIT",
":",
"System",
".",
"getProperties",
"... | this creates the webdriver object, which will be used to interact with
for all browser web tests
@return WebDriver: the driver to interact with for the test | [
"this",
"creates",
"the",
"webdriver",
"object",
"which",
"will",
"be",
"used",
"to",
"interact",
"with",
"for",
"all",
"browser",
"web",
"tests"
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/Capabilities.java#L208-L268 | train |
Coveros/selenified | src/main/java/com/coveros/selenified/Capabilities.java | Capabilities.addExtraCapabilities | public void addExtraCapabilities(DesiredCapabilities extraCapabilities) {
if (extraCapabilities != null && browser.getName() != BrowserName.NONE) {
desiredCapabilities = desiredCapabilities.merge(extraCapabilities);
}
} | java | public void addExtraCapabilities(DesiredCapabilities extraCapabilities) {
if (extraCapabilities != null && browser.getName() != BrowserName.NONE) {
desiredCapabilities = desiredCapabilities.merge(extraCapabilities);
}
} | [
"public",
"void",
"addExtraCapabilities",
"(",
"DesiredCapabilities",
"extraCapabilities",
")",
"{",
"if",
"(",
"extraCapabilities",
"!=",
"null",
"&&",
"browser",
".",
"getName",
"(",
")",
"!=",
"BrowserName",
".",
"NONE",
")",
"{",
"desiredCapabilities",
"=",
... | If additional capabilities are provided in the test case, add them in
@param extraCapabilities any additional parameters to set for selenium | [
"If",
"additional",
"capabilities",
"are",
"provided",
"in",
"the",
"test",
"case",
"add",
"them",
"in"
] | 396cc1f010dd69eed33cc5061c41253de246a4cd | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/Capabilities.java#L291-L295 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.