id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6,700 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.betweenIfNotNull | public static <T> ExpressionList<T> betweenIfNotNull(ExpressionList<T> expressionList,
String propertyName,
Object start,
Object end) {
A... | java | public static <T> ExpressionList<T> betweenIfNotNull(ExpressionList<T> expressionList,
String propertyName,
Object start,
Object end) {
A... | [
"public",
"static",
"<",
"T",
">",
"ExpressionList",
"<",
"T",
">",
"betweenIfNotNull",
"(",
"ExpressionList",
"<",
"T",
">",
"expressionList",
",",
"String",
"propertyName",
",",
"Object",
"start",
",",
"Object",
"end",
")",
"{",
"Assert",
".",
"notNull",
... | Return a ExpressionList specifying propertyName between start and end.
@param expressionList the ExpressionList to add contains expression
@param propertyName the property name of entity bean.
@param start start value.
@param end end value.
@param <T> the type of entity.
@return a Expr... | [
"Return",
"a",
"ExpressionList",
"specifying",
"propertyName",
"between",
"start",
"and",
"end",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L292-L302 |
6,701 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.orContains | public static <T> ExpressionList<T> orContains(ExpressionList<T> expressionList,
List<String> propertyNames,
String value) {
Assert.notNull(expressionList, "expressionList must not null");
Assert.no... | java | public static <T> ExpressionList<T> orContains(ExpressionList<T> expressionList,
List<String> propertyNames,
String value) {
Assert.notNull(expressionList, "expressionList must not null");
Assert.no... | [
"public",
"static",
"<",
"T",
">",
"ExpressionList",
"<",
"T",
">",
"orContains",
"(",
"ExpressionList",
"<",
"T",
">",
"expressionList",
",",
"List",
"<",
"String",
">",
"propertyNames",
",",
"String",
"value",
")",
"{",
"Assert",
".",
"notNull",
"(",
"... | Return a ExpressionList specifying propertyNames contains value.
@param expressionList the ExpressionList to add contains expression
@param propertyNames the property name of entity bean.
@param value contains value.
@param <T> the type of entity.
@return the ExpressionList specifying propertyName... | [
"Return",
"a",
"ExpressionList",
"specifying",
"propertyNames",
"contains",
"value",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L313-L335 |
6,702 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.queryWithPage | public static <T> Query<T> queryWithPage(ExpressionList<T> expressionList, Pageable pageable) {
Assert.notNull(expressionList, "expressionList must not null");
Assert.notNull(pageable, "pageable must not null");
return expressionList.setMaxRows(pageable.getPageSize())
.setFir... | java | public static <T> Query<T> queryWithPage(ExpressionList<T> expressionList, Pageable pageable) {
Assert.notNull(expressionList, "expressionList must not null");
Assert.notNull(pageable, "pageable must not null");
return expressionList.setMaxRows(pageable.getPageSize())
.setFir... | [
"public",
"static",
"<",
"T",
">",
"Query",
"<",
"T",
">",
"queryWithPage",
"(",
"ExpressionList",
"<",
"T",
">",
"expressionList",
",",
"Pageable",
"pageable",
")",
"{",
"Assert",
".",
"notNull",
"(",
"expressionList",
",",
"\"expressionList must not null\"",
... | Return query specifying page.
@param expressionList the ExpressionList to add contains expression
@param pageable 0-based index page.
@param <T> the type of entity.
@return the query specifying page. | [
"Return",
"query",
"specifying",
"page",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L345-L351 |
6,703 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.createQuery | @Override
public <T> Query<T> createQuery(Class<T> entityType, String eql) {
Assert.notNull(entityType, "entityType must not null");
Assert.hasText(eql, "eql must has text");
return ebeanServer.createQuery(entityType, eql);
} | java | @Override
public <T> Query<T> createQuery(Class<T> entityType, String eql) {
Assert.notNull(entityType, "entityType must not null");
Assert.hasText(eql, "eql must has text");
return ebeanServer.createQuery(entityType, eql);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"Query",
"<",
"T",
">",
"createQuery",
"(",
"Class",
"<",
"T",
">",
"entityType",
",",
"String",
"eql",
")",
"{",
"Assert",
".",
"notNull",
"(",
"entityType",
",",
"\"entityType must not null\"",
")",
";",
"Asser... | Return a query using Ebean ORM query.
@param eql the Ebean ORM query.
@return the created Query using ORM query. | [
"Return",
"a",
"query",
"using",
"Ebean",
"ORM",
"query",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L424-L429 |
6,704 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.createSqlQuery | @Override
public SqlQuery createSqlQuery(String sql) {
Assert.hasText(sql, "sql must has text");
return ebeanServer.createSqlQuery(sql);
} | java | @Override
public SqlQuery createSqlQuery(String sql) {
Assert.hasText(sql, "sql must has text");
return ebeanServer.createSqlQuery(sql);
} | [
"@",
"Override",
"public",
"SqlQuery",
"createSqlQuery",
"(",
"String",
"sql",
")",
"{",
"Assert",
".",
"hasText",
"(",
"sql",
",",
"\"sql must has text\"",
")",
";",
"return",
"ebeanServer",
".",
"createSqlQuery",
"(",
"sql",
")",
";",
"}"
] | Return an SqlQuery for performing native SQL queries that return SqlRow's.
@param sql the sql to create SqlQuery using native SQL.
@return the created SqlQuery. | [
"Return",
"an",
"SqlQuery",
"for",
"performing",
"native",
"SQL",
"queries",
"that",
"return",
"SqlRow",
"s",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L437-L441 |
6,705 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.createSqlQuery | @Override
public <T> Query<T> createSqlQuery(Class<T> entityType, String sql) {
Assert.notNull(entityType, "entityType must not null");
Assert.hasText(sql, "sql must has text");
RawSqlBuilder rawSqlBuilder = RawSqlBuilder.parse(sql);
return ebeanServer.find(entityType).setRawSql... | java | @Override
public <T> Query<T> createSqlQuery(Class<T> entityType, String sql) {
Assert.notNull(entityType, "entityType must not null");
Assert.hasText(sql, "sql must has text");
RawSqlBuilder rawSqlBuilder = RawSqlBuilder.parse(sql);
return ebeanServer.find(entityType).setRawSql... | [
"@",
"Override",
"public",
"<",
"T",
">",
"Query",
"<",
"T",
">",
"createSqlQuery",
"(",
"Class",
"<",
"T",
">",
"entityType",
",",
"String",
"sql",
")",
"{",
"Assert",
".",
"notNull",
"(",
"entityType",
",",
"\"entityType must not null\"",
")",
";",
"As... | Return a query using native SQL.
@param sql native SQL.
@return the created Query using native SQL. | [
"Return",
"a",
"query",
"using",
"native",
"SQL",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L449-L455 |
6,706 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.createSqlQueryMappingColumns | @Override
public <T> Query<T> createSqlQueryMappingColumns(Class<T> entityType,
String sql,
Map<String, String> columnMapping) {
Assert.notNull(entityType, "entityType must not null");
Asse... | java | @Override
public <T> Query<T> createSqlQueryMappingColumns(Class<T> entityType,
String sql,
Map<String, String> columnMapping) {
Assert.notNull(entityType, "entityType must not null");
Asse... | [
"@",
"Override",
"public",
"<",
"T",
">",
"Query",
"<",
"T",
">",
"createSqlQueryMappingColumns",
"(",
"Class",
"<",
"T",
">",
"entityType",
",",
"String",
"sql",
",",
"Map",
"<",
"String",
",",
"String",
">",
"columnMapping",
")",
"{",
"Assert",
".",
... | Return a query using native SQL and column mapping.
@param sql native SQL
@param columnMapping column mapping,key is dbColumn, value is propertyName.
@return the created Query using native SQL and column mapping config. | [
"Return",
"a",
"query",
"using",
"native",
"SQL",
"and",
"column",
"mapping",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L464-L476 |
6,707 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.createNamedQuery | @Override
public <T> Query<T> createNamedQuery(Class<T> entityType, String queryName) {
return ebeanServer.createNamedQuery(entityType, queryName);
} | java | @Override
public <T> Query<T> createNamedQuery(Class<T> entityType, String queryName) {
return ebeanServer.createNamedQuery(entityType, queryName);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"Query",
"<",
"T",
">",
"createNamedQuery",
"(",
"Class",
"<",
"T",
">",
"entityType",
",",
"String",
"queryName",
")",
"{",
"return",
"ebeanServer",
".",
"createNamedQuery",
"(",
"entityType",
",",
"queryName",
")... | Return a query using query name.
@param queryName the name of query defined in ebean.xml or Entity.
@return the query using query name. | [
"Return",
"a",
"query",
"using",
"query",
"name",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L505-L508 |
6,708 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.createDtoQuery | @Override
public <T> DtoQuery<T> createDtoQuery(Class<T> dtoType, String sql) {
return ebeanServer.findDto(dtoType, sql).setRelaxedMode();
} | java | @Override
public <T> DtoQuery<T> createDtoQuery(Class<T> dtoType, String sql) {
return ebeanServer.findDto(dtoType, sql).setRelaxedMode();
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"DtoQuery",
"<",
"T",
">",
"createDtoQuery",
"(",
"Class",
"<",
"T",
">",
"dtoType",
",",
"String",
"sql",
")",
"{",
"return",
"ebeanServer",
".",
"findDto",
"(",
"dtoType",
",",
"sql",
")",
".",
"setRelaxedMod... | Return a dto query using sql.
@param dtoType DTO Bean type, just normal classes
@param sql native SQL
@return | [
"Return",
"a",
"dto",
"query",
"using",
"sql",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L517-L520 |
6,709 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.createNamedDtoQuery | @Override
public <T> DtoQuery<T> createNamedDtoQuery(Class<T> dtoType, String namedQuery) {
return ebeanServer.createNamedDtoQuery(dtoType, namedQuery).setRelaxedMode();
} | java | @Override
public <T> DtoQuery<T> createNamedDtoQuery(Class<T> dtoType, String namedQuery) {
return ebeanServer.createNamedDtoQuery(dtoType, namedQuery).setRelaxedMode();
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"DtoQuery",
"<",
"T",
">",
"createNamedDtoQuery",
"(",
"Class",
"<",
"T",
">",
"dtoType",
",",
"String",
"namedQuery",
")",
"{",
"return",
"ebeanServer",
".",
"createNamedDtoQuery",
"(",
"dtoType",
",",
"namedQuery",... | Return a named dto query.
@param dtoType DTO Bean type, just normal classes
@param namedQuery the query using query name.
@return | [
"Return",
"a",
"named",
"dto",
"query",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L529-L532 |
6,710 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java | EbeanQueryChannelService.exampleOf | @Override
public ExampleExpression exampleOf(Object example,
boolean caseInsensitive,
LikeType likeType) {
return ebeanServer.getExpressionFactory().exampleLike(example, caseInsensitive, likeType);
} | java | @Override
public ExampleExpression exampleOf(Object example,
boolean caseInsensitive,
LikeType likeType) {
return ebeanServer.getExpressionFactory().exampleLike(example, caseInsensitive, likeType);
} | [
"@",
"Override",
"public",
"ExampleExpression",
"exampleOf",
"(",
"Object",
"example",
",",
"boolean",
"caseInsensitive",
",",
"LikeType",
"likeType",
")",
"{",
"return",
"ebeanServer",
".",
"getExpressionFactory",
"(",
")",
".",
"exampleLike",
"(",
"example",
","... | Return a ExampleExpression specifying more options.
@return the created ExampleExpression specifying more options. | [
"Return",
"a",
"ExampleExpression",
"specifying",
"more",
"options",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/querychannel/EbeanQueryChannelService.java#L549-L554 |
6,711 | nextreports/nextreports-server | src/ro/nextreports/server/web/dashboard/alarm/AlarmHTML5Panel.java | AlarmHTML5Panel.getResizeJavaScript | private String getResizeJavaScript() {
StringBuilder sb = new StringBuilder();
sb.append("$(window).bind(\'resizeEnd\',function(){");
sb.append(getAlarmCall());
sb.append("});");
return sb.toString();
} | java | private String getResizeJavaScript() {
StringBuilder sb = new StringBuilder();
sb.append("$(window).bind(\'resizeEnd\',function(){");
sb.append(getAlarmCall());
sb.append("});");
return sb.toString();
} | [
"private",
"String",
"getResizeJavaScript",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"\"$(window).bind(\\'resizeEnd\\',function(){\"",
")",
";",
"sb",
".",
"append",
"(",
"getAlarmCall",
"(",
")"... | alarm call will be made only when resize event finished! | [
"alarm",
"call",
"will",
"be",
"made",
"only",
"when",
"resize",
"event",
"finished!"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/dashboard/alarm/AlarmHTML5Panel.java#L78-L84 |
6,712 | hexagonframework/spring-data-ebean | src/main/java/org/springframework/data/ebean/domain/AbstractAggregateRoot.java | AbstractAggregateRoot.registerEvent | protected <T extends DomainEvent> T registerEvent(T event) {
Assert.notNull(event, "Domain event must not be null!");
this.domainEvents.add(event);
return event;
} | java | protected <T extends DomainEvent> T registerEvent(T event) {
Assert.notNull(event, "Domain event must not be null!");
this.domainEvents.add(event);
return event;
} | [
"protected",
"<",
"T",
"extends",
"DomainEvent",
">",
"T",
"registerEvent",
"(",
"T",
"event",
")",
"{",
"Assert",
".",
"notNull",
"(",
"event",
",",
"\"Domain event must not be null!\"",
")",
";",
"this",
".",
"domainEvents",
".",
"add",
"(",
"event",
")",
... | Registers the given event object for publication on a call to a Spring Data repository's save methods.
@param event must not be {@literal null}.
@return the event that has been added. | [
"Registers",
"the",
"given",
"event",
"object",
"for",
"publication",
"on",
"a",
"call",
"to",
"a",
"Spring",
"Data",
"repository",
"s",
"save",
"methods",
"."
] | dd11b97654982403b50dd1d5369cadad71fce410 | https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/domain/AbstractAggregateRoot.java#L47-L52 |
6,713 | nextreports/nextreports-server | src/ro/nextreports/server/report/util/ReportUtil.java | ReportUtil.hasIntervalParameters | public static boolean hasIntervalParameters(Settings settings, Report report) {
if (!ReportConstants.NEXT.equals(report.getType())) {
return false;
}
ro.nextreports.engine.Report nextReport = NextUtil.getNextReport(settings, report);
Map<String, QueryParameter> parameters = ParameterUtil.getUs... | java | public static boolean hasIntervalParameters(Settings settings, Report report) {
if (!ReportConstants.NEXT.equals(report.getType())) {
return false;
}
ro.nextreports.engine.Report nextReport = NextUtil.getNextReport(settings, report);
Map<String, QueryParameter> parameters = ParameterUtil.getUs... | [
"public",
"static",
"boolean",
"hasIntervalParameters",
"(",
"Settings",
"settings",
",",
"Report",
"report",
")",
"{",
"if",
"(",
"!",
"ReportConstants",
".",
"NEXT",
".",
"equals",
"(",
"report",
".",
"getType",
"(",
")",
")",
")",
"{",
"return",
"false"... | Test if a report has two parameters with names start_date and end_date, of type date and with single selection
@param settings settings
@param report report
@return true if a report has two parameters with names start_date and end_date, of type date and with single selection | [
"Test",
"if",
"a",
"report",
"has",
"two",
"parameters",
"with",
"names",
"start_date",
"and",
"end_date",
"of",
"type",
"date",
"and",
"with",
"single",
"selection"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/report/util/ReportUtil.java#L272-L300 |
6,714 | nextreports/nextreports-server | src/ro/nextreports/server/api/client/jdbc/Driver.java | Driver.parseURL | public static Properties parseURL(String url, Properties info) {
if ((url == null) || !url.toLowerCase().startsWith(driverPrefix)) {
return null; // throws exception ?!
}
Properties props = new Properties(info);
// take local copy of existing properties
Enumeration<?> en = info.property... | java | public static Properties parseURL(String url, Properties info) {
if ((url == null) || !url.toLowerCase().startsWith(driverPrefix)) {
return null; // throws exception ?!
}
Properties props = new Properties(info);
// take local copy of existing properties
Enumeration<?> en = info.property... | [
"public",
"static",
"Properties",
"parseURL",
"(",
"String",
"url",
",",
"Properties",
"info",
")",
"{",
"if",
"(",
"(",
"url",
"==",
"null",
")",
"||",
"!",
"url",
".",
"toLowerCase",
"(",
")",
".",
"startsWith",
"(",
"driverPrefix",
")",
")",
"{",
... | Parse the driver URL and extract the properties.
@param url the URL to parse
@param info any existing properties already loaded in a
<code>Properties</code> object
@return the URL properties as a <code>Properties</code> object | [
"Parse",
"the",
"driver",
"URL",
"and",
"extract",
"the",
"properties",
"."
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/api/client/jdbc/Driver.java#L133-L167 |
6,715 | nextreports/nextreports-server | src/ro/nextreports/server/web/themes/ThemeFileFilter.java | ThemeFileFilter.accept | public boolean accept(File file) {
String name = file.getName();
if (file.isDirectory()) {
return true;
}
return (name.startsWith("theme") && name.endsWith(".properties"));
} | java | public boolean accept(File file) {
String name = file.getName();
if (file.isDirectory()) {
return true;
}
return (name.startsWith("theme") && name.endsWith(".properties"));
} | [
"public",
"boolean",
"accept",
"(",
"File",
"file",
")",
"{",
"String",
"name",
"=",
"file",
".",
"getName",
"(",
")",
";",
"if",
"(",
"file",
".",
"isDirectory",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"(",
"name",
".",
"startsWi... | Returns true.
@param file the file to check
@return true | [
"Returns",
"true",
"."
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/themes/ThemeFileFilter.java#L40-L46 |
6,716 | nextreports/nextreports-server | src/ro/nextreports/server/service/DefaultStorageService.java | DefaultStorageService.getSettings | @Transactional(readOnly = true)
public Settings getSettings() {
try {
return (Settings) getEntity(StorageConstants.SETTINGS_ROOT);
} catch (NotFoundException e) {
// should never happen
e.printStackTrace();
LOG.error("Could not read Settings node", e);
return new Settings();
}
} | java | @Transactional(readOnly = true)
public Settings getSettings() {
try {
return (Settings) getEntity(StorageConstants.SETTINGS_ROOT);
} catch (NotFoundException e) {
// should never happen
e.printStackTrace();
LOG.error("Could not read Settings node", e);
return new Settings();
}
} | [
"@",
"Transactional",
"(",
"readOnly",
"=",
"true",
")",
"public",
"Settings",
"getSettings",
"(",
")",
"{",
"try",
"{",
"return",
"(",
"Settings",
")",
"getEntity",
"(",
"StorageConstants",
".",
"SETTINGS_ROOT",
")",
";",
"}",
"catch",
"(",
"NotFoundExcepti... | 'An Authentication object was not found in the SecurityContext' | [
"An",
"Authentication",
"object",
"was",
"not",
"found",
"in",
"the",
"SecurityContext"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/service/DefaultStorageService.java#L439-L449 |
6,717 | nextreports/nextreports-server | src/ro/nextreports/server/web/common/misc/ExtendedPalette.java | ExtendedPalette.newAddAllComponent | protected Component newAddAllComponent() {
return new PaletteButton("addAllButton") {
private static final long serialVersionUID = 1L;
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().put("onclick", getAddAl... | java | protected Component newAddAllComponent() {
return new PaletteButton("addAllButton") {
private static final long serialVersionUID = 1L;
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().put("onclick", getAddAl... | [
"protected",
"Component",
"newAddAllComponent",
"(",
")",
"{",
"return",
"new",
"PaletteButton",
"(",
"\"addAllButton\"",
")",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"1L",
";",
"protected",
"void",
"onComponentTag",
"(",
"ComponentTag",
... | factory method for the addAll component
@return addAll component | [
"factory",
"method",
"for",
"the",
"addAll",
"component"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/common/misc/ExtendedPalette.java#L116-L125 |
6,718 | nextreports/nextreports-server | src/ro/nextreports/server/web/common/misc/ExtendedPalette.java | ExtendedPalette.newRemoveAllComponent | protected Component newRemoveAllComponent() {
return new PaletteButton("removeAllButton") {
private static final long serialVersionUID = 1L;
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().put("onclick", ge... | java | protected Component newRemoveAllComponent() {
return new PaletteButton("removeAllButton") {
private static final long serialVersionUID = 1L;
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().put("onclick", ge... | [
"protected",
"Component",
"newRemoveAllComponent",
"(",
")",
"{",
"return",
"new",
"PaletteButton",
"(",
"\"removeAllButton\"",
")",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"1L",
";",
"protected",
"void",
"onComponentTag",
"(",
"Component... | factory method for the removeAll component
@return removeAll component | [
"factory",
"method",
"for",
"the",
"removeAll",
"component"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/common/misc/ExtendedPalette.java#L132-L141 |
6,719 | nextreports/nextreports-server | src/ro/nextreports/server/web/common/misc/ExtendedPalette.java | ExtendedPalette.newRemoveComponent | protected Component newRemoveComponent() {
return new PaletteButton("removeButton") {
private static final long serialVersionUID = 1L;
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().p... | java | protected Component newRemoveComponent() {
return new PaletteButton("removeButton") {
private static final long serialVersionUID = 1L;
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().p... | [
"protected",
"Component",
"newRemoveComponent",
"(",
")",
"{",
"return",
"new",
"PaletteButton",
"(",
"\"removeButton\"",
")",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"1L",
";",
"@",
"Override",
"protected",
"void",
"onComponentTag",
"(... | factory method for the remove component
@return remove component | [
"factory",
"method",
"for",
"the",
"remove",
"component"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/common/misc/ExtendedPalette.java#L206-L216 |
6,720 | nextreports/nextreports-server | src/ro/nextreports/server/web/common/misc/ExtendedPalette.java | ExtendedPalette.newAddComponent | protected Component newAddComponent() {
return new PaletteButton("addButton") {
private static final long serialVersionUID = 1L;
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().put("on... | java | protected Component newAddComponent() {
return new PaletteButton("addButton") {
private static final long serialVersionUID = 1L;
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.getAttributes().put("on... | [
"protected",
"Component",
"newAddComponent",
"(",
")",
"{",
"return",
"new",
"PaletteButton",
"(",
"\"addButton\"",
")",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"1L",
";",
"@",
"Override",
"protected",
"void",
"onComponentTag",
"(",
"... | factory method for the addcomponent
@return add component | [
"factory",
"method",
"for",
"the",
"addcomponent"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/common/misc/ExtendedPalette.java#L223-L233 |
6,721 | nextreports/nextreports-server | src/ro/nextreports/server/service/DefaultReportService.java | DefaultReportService.encodeFileName | private String encodeFileName(String fileName) {
String result = Normalizer.normalize(fileName, Normalizer.Form.NFD).replaceAll("\\s+", "-")
.replaceAll("[^A-Za-z0-9_\\-\\.]", "");
if (result.isEmpty()) {
result = "report";
}
return result;
} | java | private String encodeFileName(String fileName) {
String result = Normalizer.normalize(fileName, Normalizer.Form.NFD).replaceAll("\\s+", "-")
.replaceAll("[^A-Za-z0-9_\\-\\.]", "");
if (result.isEmpty()) {
result = "report";
}
return result;
} | [
"private",
"String",
"encodeFileName",
"(",
"String",
"fileName",
")",
"{",
"String",
"result",
"=",
"Normalizer",
".",
"normalize",
"(",
"fileName",
",",
"Normalizer",
".",
"Form",
".",
"NFD",
")",
".",
"replaceAll",
"(",
"\"\\\\s+\"",
",",
"\"-\"",
")",
... | All characters different from a standard set are deleted | [
"All",
"characters",
"different",
"from",
"a",
"standard",
"set",
"are",
"deleted"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/service/DefaultReportService.java#L399-L407 |
6,722 | nextreports/nextreports-server | src/ro/nextreports/server/web/schedule/ScheduleWizard.java | ScheduleWizard.newButtonBar | protected Component newButtonBar(String s) {
buttonBar = new AjaxWizardButtonBar(s, this) {
public void onCancel(AjaxRequestTarget target) {
EntityBrowserPanel panel = findParent(EntityBrowserPanel.class);
panel.backwardWorkspace(target);
}
... | java | protected Component newButtonBar(String s) {
buttonBar = new AjaxWizardButtonBar(s, this) {
public void onCancel(AjaxRequestTarget target) {
EntityBrowserPanel panel = findParent(EntityBrowserPanel.class);
panel.backwardWorkspace(target);
}
... | [
"protected",
"Component",
"newButtonBar",
"(",
"String",
"s",
")",
"{",
"buttonBar",
"=",
"new",
"AjaxWizardButtonBar",
"(",
"s",
",",
"this",
")",
"{",
"public",
"void",
"onCancel",
"(",
"AjaxRequestTarget",
"target",
")",
"{",
"EntityBrowserPanel",
"panel",
... | Job step and Destination step are allowed to finish | [
"Job",
"step",
"and",
"Destination",
"step",
"are",
"allowed",
"to",
"finish"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/schedule/ScheduleWizard.java#L177-L186 |
6,723 | nextreports/nextreports-server | src/ro/nextreports/server/web/NextServerSession.java | NextServerSession.checkForSignIn | protected boolean checkForSignIn() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if ((authentication != null) && authentication.isAuthenticated()) {
LOG.debug("Security context contains CAS authentication");
return true;
}
return false;
} | java | protected boolean checkForSignIn() {
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if ((authentication != null) && authentication.isAuthenticated()) {
LOG.debug("Security context contains CAS authentication");
return true;
}
return false;
} | [
"protected",
"boolean",
"checkForSignIn",
"(",
")",
"{",
"Authentication",
"authentication",
"=",
"SecurityContextHolder",
".",
"getContext",
"(",
")",
".",
"getAuthentication",
"(",
")",
";",
"if",
"(",
"(",
"authentication",
"!=",
"null",
")",
"&&",
"authentic... | used in NextServerApplication.addSecurityStrategy | [
"used",
"in",
"NextServerApplication",
".",
"addSecurityStrategy"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/NextServerSession.java#L305-L313 |
6,724 | nextreports/nextreports-server | src/ro/nextreports/server/update/StorageUpdate12.java | StorageUpdate12.addRuntimeNameProperty | private void addRuntimeNameProperty() throws RepositoryException {
String statement =
"/jcr:root" + ISO9075.encodePath(StorageConstants.REPORTS_ROOT) +
"//*[@className='ro.nextreports.server.domain.Report']" +
"//*[fn:name()='parametersValues']";
QueryResult queryResult = getTemplate().query(... | java | private void addRuntimeNameProperty() throws RepositoryException {
String statement =
"/jcr:root" + ISO9075.encodePath(StorageConstants.REPORTS_ROOT) +
"//*[@className='ro.nextreports.server.domain.Report']" +
"//*[fn:name()='parametersValues']";
QueryResult queryResult = getTemplate().query(... | [
"private",
"void",
"addRuntimeNameProperty",
"(",
")",
"throws",
"RepositoryException",
"{",
"String",
"statement",
"=",
"\"/jcr:root\"",
"+",
"ISO9075",
".",
"encodePath",
"(",
"StorageConstants",
".",
"REPORTS_ROOT",
")",
"+",
"\"//*[@className='ro.nextreports.server.do... | add runtimeName property to ParameterValue | [
"add",
"runtimeName",
"property",
"to",
"ParameterValue"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/update/StorageUpdate12.java#L37-L58 |
6,725 | nextreports/nextreports-server | src/ro/nextreports/server/update/StorageUpdate21.java | StorageUpdate21.convertOldIdNameClass | private void convertOldIdNameClass() throws RepositoryException {
String searchRoot = "/jcr:root" + ISO9075.encodePath(StorageConstants.NEXT_SERVER_ROOT);
String searchPropertyName = "className";
String searchPropertyValue = "com.asf.nextserver.domain.ParameterValue";
String statement = searchRoot + "//*[@" + s... | java | private void convertOldIdNameClass() throws RepositoryException {
String searchRoot = "/jcr:root" + ISO9075.encodePath(StorageConstants.NEXT_SERVER_ROOT);
String searchPropertyName = "className";
String searchPropertyValue = "com.asf.nextserver.domain.ParameterValue";
String statement = searchRoot + "//*[@" + s... | [
"private",
"void",
"convertOldIdNameClass",
"(",
")",
"throws",
"RepositoryException",
"{",
"String",
"searchRoot",
"=",
"\"/jcr:root\"",
"+",
"ISO9075",
".",
"encodePath",
"(",
"StorageConstants",
".",
"NEXT_SERVER_ROOT",
")",
";",
"String",
"searchPropertyName",
"="... | IdName values can be found in ParameterValue entities which are used in Dashboards widget parameters or Scheduler report runtime parameters | [
"IdName",
"values",
"can",
"be",
"found",
"in",
"ParameterValue",
"entities",
"which",
"are",
"used",
"in",
"Dashboards",
"widget",
"parameters",
"or",
"Scheduler",
"report",
"runtime",
"parameters"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/update/StorageUpdate21.java#L53-L111 |
6,726 | nextreports/nextreports-server | src/ro/nextreports/server/settings/SettingsBean.java | SettingsBean.getMailServerIp | public String getMailServerIp() {
Settings settings = getSettings();
if (settings.getMailServer() == null) {
return "127.0.0.1";
}
return settings.getMailServer().getIp();
} | java | public String getMailServerIp() {
Settings settings = getSettings();
if (settings.getMailServer() == null) {
return "127.0.0.1";
}
return settings.getMailServer().getIp();
} | [
"public",
"String",
"getMailServerIp",
"(",
")",
"{",
"Settings",
"settings",
"=",
"getSettings",
"(",
")",
";",
"if",
"(",
"settings",
".",
"getMailServer",
"(",
")",
"==",
"null",
")",
"{",
"return",
"\"127.0.0.1\"",
";",
"}",
"return",
"settings",
".",
... | helper methods used in Spring xml files with SpEL | [
"helper",
"methods",
"used",
"in",
"Spring",
"xml",
"files",
"with",
"SpEL"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/settings/SettingsBean.java#L50-L57 |
6,727 | nextreports/nextreports-server | src/ro/nextreports/server/dao/JcrStorageDao.java | JcrStorageDao.clearParentsCache | private void clearParentsCache(Entity entity) {
try {
String xpath = null;
if (entity instanceof DataSource) {
// find all reports and charts with this DataSource
xpath = "//nextServer//*[@dataSource='" + entity.getId() + "']";
} else if (entity instanceof Report) {
// find all schedulers with th... | java | private void clearParentsCache(Entity entity) {
try {
String xpath = null;
if (entity instanceof DataSource) {
// find all reports and charts with this DataSource
xpath = "//nextServer//*[@dataSource='" + entity.getId() + "']";
} else if (entity instanceof Report) {
// find all schedulers with th... | [
"private",
"void",
"clearParentsCache",
"(",
"Entity",
"entity",
")",
"{",
"try",
"{",
"String",
"xpath",
"=",
"null",
";",
"if",
"(",
"entity",
"instanceof",
"DataSource",
")",
"{",
"// find all reports and charts with this DataSource",
"xpath",
"=",
"\"//nextServe... | clear all parents from cache | [
"clear",
"all",
"parents",
"from",
"cache"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/dao/JcrStorageDao.java#L681-L713 |
6,728 | nextreports/nextreports-server | src/ro/nextreports/server/dao/JcrStorageDao.java | JcrStorageDao.getDerbyConnection | private Connection getDerbyConnection(String wkpDir) {
// See your driver documentation for the proper format of this string :
wkpDir = wkpDir.replaceAll("\\\\", "/");
System.err.println(wkpDir);
String DB_CONN_STRING = "jdbc:derby:" + wkpDir // "d:/workspace/workspace-next-work/nextreports-server/data/workspac... | java | private Connection getDerbyConnection(String wkpDir) {
// See your driver documentation for the proper format of this string :
wkpDir = wkpDir.replaceAll("\\\\", "/");
System.err.println(wkpDir);
String DB_CONN_STRING = "jdbc:derby:" + wkpDir // "d:/workspace/workspace-next-work/nextreports-server/data/workspac... | [
"private",
"Connection",
"getDerbyConnection",
"(",
"String",
"wkpDir",
")",
"{",
"// See your driver documentation for the proper format of this string :",
"wkpDir",
"=",
"wkpDir",
".",
"replaceAll",
"(",
"\"\\\\\\\\\"",
",",
"\"/\"",
")",
";",
"System",
".",
"err",
".... | Uses DriverManager. | [
"Uses",
"DriverManager",
"."
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/dao/JcrStorageDao.java#L1280-L1306 |
6,729 | nextreports/nextreports-server | src/ro/nextreports/server/web/common/table/DateColumn.java | DateColumn.getAlignedFormat | public static DateFormat getAlignedFormat() {
if (DATE_FORMAT instanceof SimpleDateFormat) {
SimpleDateFormat sdf = (SimpleDateFormat) DATE_FORMAT;
String pattern = sdf.toPattern()
.replaceAll("M+", "MM")
.replaceAll("d+", "dd")
.replaceAll("h+", "hh")
.replaceAll("H+", "HH");
sdf.applyPa... | java | public static DateFormat getAlignedFormat() {
if (DATE_FORMAT instanceof SimpleDateFormat) {
SimpleDateFormat sdf = (SimpleDateFormat) DATE_FORMAT;
String pattern = sdf.toPattern()
.replaceAll("M+", "MM")
.replaceAll("d+", "dd")
.replaceAll("h+", "hh")
.replaceAll("H+", "HH");
sdf.applyPa... | [
"public",
"static",
"DateFormat",
"getAlignedFormat",
"(",
")",
"{",
"if",
"(",
"DATE_FORMAT",
"instanceof",
"SimpleDateFormat",
")",
"{",
"SimpleDateFormat",
"sdf",
"=",
"(",
"SimpleDateFormat",
")",
"DATE_FORMAT",
";",
"String",
"pattern",
"=",
"sdf",
".",
"to... | we need to take the pattern and modify it | [
"we",
"need",
"to",
"take",
"the",
"pattern",
"and",
"modify",
"it"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/common/table/DateColumn.java#L61-L74 |
6,730 | nextreports/nextreports-server | src/ro/nextreports/server/web/report/ManualListPanel.java | ManualListPanel.getValues | public List<Serializable> getValues(String text, String type) throws NumberFormatException {
List<Serializable> list = new ArrayList<Serializable>();
String[] values = text.split(DELIM);
for (String v : values) {
Serializable value;
if (QueryParameter.INTEGER_VALUE.equals... | java | public List<Serializable> getValues(String text, String type) throws NumberFormatException {
List<Serializable> list = new ArrayList<Serializable>();
String[] values = text.split(DELIM);
for (String v : values) {
Serializable value;
if (QueryParameter.INTEGER_VALUE.equals... | [
"public",
"List",
"<",
"Serializable",
">",
"getValues",
"(",
"String",
"text",
",",
"String",
"type",
")",
"throws",
"NumberFormatException",
"{",
"List",
"<",
"Serializable",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"Serializable",
">",
"(",
")",
";",
... | number and string values can be separated by semicolon delimiter | [
"number",
"and",
"string",
"values",
"can",
"be",
"separated",
"by",
"semicolon",
"delimiter"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/report/ManualListPanel.java#L221-L247 |
6,731 | nextreports/nextreports-server | src/ro/nextreports/server/web/report/ParameterRuntimePanel.java | ParameterRuntimePanel.getSelectedValues | private List<Serializable> getSelectedValues(List<IdName> values, List<Serializable> defaultValues) {
List<Serializable> selectedValues = new ArrayList<Serializable>();
if (defaultValues == null) {
return selectedValues;
}
for (Serializable s : defaultValues) {
fo... | java | private List<Serializable> getSelectedValues(List<IdName> values, List<Serializable> defaultValues) {
List<Serializable> selectedValues = new ArrayList<Serializable>();
if (defaultValues == null) {
return selectedValues;
}
for (Serializable s : defaultValues) {
fo... | [
"private",
"List",
"<",
"Serializable",
">",
"getSelectedValues",
"(",
"List",
"<",
"IdName",
">",
"values",
",",
"List",
"<",
"Serializable",
">",
"defaultValues",
")",
"{",
"List",
"<",
"Serializable",
">",
"selectedValues",
"=",
"new",
"ArrayList",
"<",
"... | a default value must be simple java object , or an IdName but only with the id | [
"a",
"default",
"value",
"must",
"be",
"simple",
"java",
"object",
"or",
"an",
"IdName",
"but",
"only",
"with",
"the",
"id"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/report/ParameterRuntimePanel.java#L543-L563 |
6,732 | nextreports/nextreports-server | src/ro/nextreports/server/web/report/ParameterRuntimePanel.java | ParameterRuntimePanel.createAjax | private AjaxFormComponentUpdatingBehavior createAjax(final QueryParameter parameter, final IModel model, final Component component, final String time) {
return new AjaxFormComponentUpdatingBehavior("onchange") {
@SuppressWarnings("unchecked")
@Override
protected void onUpdate(AjaxReq... | java | private AjaxFormComponentUpdatingBehavior createAjax(final QueryParameter parameter, final IModel model, final Component component, final String time) {
return new AjaxFormComponentUpdatingBehavior("onchange") {
@SuppressWarnings("unchecked")
@Override
protected void onUpdate(AjaxReq... | [
"private",
"AjaxFormComponentUpdatingBehavior",
"createAjax",
"(",
"final",
"QueryParameter",
"parameter",
",",
"final",
"IModel",
"model",
",",
"final",
"Component",
"component",
",",
"final",
"String",
"time",
")",
"{",
"return",
"new",
"AjaxFormComponentUpdatingBehav... | used to update hours and minutes | [
"used",
"to",
"update",
"hours",
"and",
"minutes"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/report/ParameterRuntimePanel.java#L604-L628 |
6,733 | nextreports/nextreports-server | src/ro/nextreports/server/util/StringUtil.java | StringUtil.replaceString | public static ReplacedString replaceString(String s, String find, String replace) {
if (replace == null) replace = "-";
int index = -1;
int l = find.length();
boolean replaced = false;
do {
index = s.indexOf(find, index);
if (index >= 0) {
... | java | public static ReplacedString replaceString(String s, String find, String replace) {
if (replace == null) replace = "-";
int index = -1;
int l = find.length();
boolean replaced = false;
do {
index = s.indexOf(find, index);
if (index >= 0) {
... | [
"public",
"static",
"ReplacedString",
"replaceString",
"(",
"String",
"s",
",",
"String",
"find",
",",
"String",
"replace",
")",
"{",
"if",
"(",
"replace",
"==",
"null",
")",
"replace",
"=",
"\"-\"",
";",
"int",
"index",
"=",
"-",
"1",
";",
"int",
"l",... | Replace a string with another
@param s string to replace into
@param find string to be replaced
@param replace new string
@return the string with replacements | [
"Replace",
"a",
"string",
"with",
"another"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/util/StringUtil.java#L40-L53 |
6,734 | nextreports/nextreports-server | src/ro/nextreports/server/util/StringUtil.java | StringUtil.writeToClipboard | public static void writeToClipboard(String text) {
Clipboard systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable transferableText = new StringSelection(text);
systemClipboard.setContents(transferableText, null);
} | java | public static void writeToClipboard(String text) {
Clipboard systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable transferableText = new StringSelection(text);
systemClipboard.setContents(transferableText, null);
} | [
"public",
"static",
"void",
"writeToClipboard",
"(",
"String",
"text",
")",
"{",
"Clipboard",
"systemClipboard",
"=",
"Toolkit",
".",
"getDefaultToolkit",
"(",
")",
".",
"getSystemClipboard",
"(",
")",
";",
"Transferable",
"transferableText",
"=",
"new",
"StringSe... | Write a text to system clipboard
@param text text to write | [
"Write",
"a",
"text",
"to",
"system",
"clipboard"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/util/StringUtil.java#L60-L64 |
6,735 | nextreports/nextreports-server | src/ro/nextreports/server/web/core/menu/EntityTreeExpansionState.java | EntityTreeExpansionState.get | public static EntityTreeExpansionState get() {
EntityTreeExpansionState expansion = Session.get().getMetaData(KEY);
if (expansion == null) {
expansion = new EntityTreeExpansionState();
Session.get().setMetaData(KEY, expansion);
}
return expansion;
} | java | public static EntityTreeExpansionState get() {
EntityTreeExpansionState expansion = Session.get().getMetaData(KEY);
if (expansion == null) {
expansion = new EntityTreeExpansionState();
Session.get().setMetaData(KEY, expansion);
}
return expansion;
} | [
"public",
"static",
"EntityTreeExpansionState",
"get",
"(",
")",
"{",
"EntityTreeExpansionState",
"expansion",
"=",
"Session",
".",
"get",
"(",
")",
".",
"getMetaData",
"(",
"KEY",
")",
";",
"if",
"(",
"expansion",
"==",
"null",
")",
"{",
"expansion",
"=",
... | Get the expansion for the session.
@return expansion | [
"Get",
"the",
"expansion",
"for",
"the",
"session",
"."
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/core/menu/EntityTreeExpansionState.java#L121-L128 |
6,736 | nextreports/nextreports-server | src/ro/nextreports/server/web/dashboard/indicator/IndicatorHTML5Panel.java | IndicatorHTML5Panel.getResizeJavaScript | private String getResizeJavaScript() {
StringBuilder sb = new StringBuilder();
sb.append("$(window).bind(\'resizeEnd\',function(){");
sb.append(getIndicatorCall());
sb.append("});");
return sb.toString();
} | java | private String getResizeJavaScript() {
StringBuilder sb = new StringBuilder();
sb.append("$(window).bind(\'resizeEnd\',function(){");
sb.append(getIndicatorCall());
sb.append("});");
return sb.toString();
} | [
"private",
"String",
"getResizeJavaScript",
"(",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"\"$(window).bind(\\'resizeEnd\\',function(){\"",
")",
";",
"sb",
".",
"append",
"(",
"getIndicatorCall",
"(",
... | indicator call will be made only when resize event finished! | [
"indicator",
"call",
"will",
"be",
"made",
"only",
"when",
"resize",
"event",
"finished!"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/web/dashboard/indicator/IndicatorHTML5Panel.java#L112-L118 |
6,737 | nextreports/nextreports-server | src/ro/nextreports/server/service/DefaultChartService.java | DefaultChartService.getJsonData | public String getJsonData(Chart chart)
throws ReportRunnerException, NoDataFoundException, TimeoutException {
return getJsonData(chart, null, null);
} | java | public String getJsonData(Chart chart)
throws ReportRunnerException, NoDataFoundException, TimeoutException {
return getJsonData(chart, null, null);
} | [
"public",
"String",
"getJsonData",
"(",
"Chart",
"chart",
")",
"throws",
"ReportRunnerException",
",",
"NoDataFoundException",
",",
"TimeoutException",
"{",
"return",
"getJsonData",
"(",
"chart",
",",
"null",
",",
"null",
")",
";",
"}"
] | Methods with chart do not now anything about settings!! | [
"Methods",
"with",
"chart",
"do",
"not",
"now",
"anything",
"about",
"settings!!"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/service/DefaultChartService.java#L90-L93 |
6,738 | nextreports/nextreports-server | src/ro/nextreports/server/service/DefaultDashboardService.java | DefaultDashboardService.isSingleWidget | public boolean isSingleWidget(String widgetId) {
try {
WidgetState state = (WidgetState) storageService.getEntityById(widgetId);
DashboardState dState = getDashboardState(state);
if (dState.getColumnCount() > 1) {
return false;
}
if (dState.getWidgetStates().size() > 1) {
return false;
}
... | java | public boolean isSingleWidget(String widgetId) {
try {
WidgetState state = (WidgetState) storageService.getEntityById(widgetId);
DashboardState dState = getDashboardState(state);
if (dState.getColumnCount() > 1) {
return false;
}
if (dState.getWidgetStates().size() > 1) {
return false;
}
... | [
"public",
"boolean",
"isSingleWidget",
"(",
"String",
"widgetId",
")",
"{",
"try",
"{",
"WidgetState",
"state",
"=",
"(",
"WidgetState",
")",
"storageService",
".",
"getEntityById",
"(",
"widgetId",
")",
";",
"DashboardState",
"dState",
"=",
"getDashboardState",
... | just a single widget in a dashboard with a single column | [
"just",
"a",
"single",
"widget",
"in",
"a",
"dashboard",
"with",
"a",
"single",
"column"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/service/DefaultDashboardService.java#L1058-L1072 |
6,739 | nextreports/nextreports-server | src/ro/nextreports/server/service/DefaultDashboardService.java | DefaultDashboardService.resetDrillDownableCache | private void resetDrillDownableCache(String entityId) {
try {
// has no chart id in settings
if (entityId == null) {
return;
}
Entity entity = storageService.getEntityById(entityId);
if (entity instanceof Chart) {
if (((Chart)entity).isDrillDownable()) {
resetCac... | java | private void resetDrillDownableCache(String entityId) {
try {
// has no chart id in settings
if (entityId == null) {
return;
}
Entity entity = storageService.getEntityById(entityId);
if (entity instanceof Chart) {
if (((Chart)entity).isDrillDownable()) {
resetCac... | [
"private",
"void",
"resetDrillDownableCache",
"(",
"String",
"entityId",
")",
"{",
"try",
"{",
"// has no chart id in settings",
"if",
"(",
"entityId",
"==",
"null",
")",
"{",
"return",
";",
"}",
"Entity",
"entity",
"=",
"storageService",
".",
"getEntityById",
"... | for drill down reports there is no need to reset cache when we move the widget | [
"for",
"drill",
"down",
"reports",
"there",
"is",
"no",
"need",
"to",
"reset",
"cache",
"when",
"we",
"move",
"the",
"widget"
] | cfce12f5c6d52cb6a739388d50142c6e2e07c55e | https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/service/DefaultDashboardService.java#L1270-L1285 |
6,740 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/AbstractInvoker.java | AbstractInvoker.getTargetMethod | public Method getTargetMethod(Exchange exchange) {
Object o = exchange.getBindingOperationInfo().getOperationInfo().getProperty(Method.class.getName());
if (o != null && o instanceof Method) {
return (Method)o;
}
else {
throw new RuntimeException("Target method ... | java | public Method getTargetMethod(Exchange exchange) {
Object o = exchange.getBindingOperationInfo().getOperationInfo().getProperty(Method.class.getName());
if (o != null && o instanceof Method) {
return (Method)o;
}
else {
throw new RuntimeException("Target method ... | [
"public",
"Method",
"getTargetMethod",
"(",
"Exchange",
"exchange",
")",
"{",
"Object",
"o",
"=",
"exchange",
".",
"getBindingOperationInfo",
"(",
")",
".",
"getOperationInfo",
"(",
")",
".",
"getProperty",
"(",
"Method",
".",
"class",
".",
"getName",
"(",
"... | Utility method for getting the method which is going to be invoked on the service by underlying invoker. | [
"Utility",
"method",
"for",
"getting",
"the",
"method",
"which",
"is",
"going",
"to",
"be",
"invoked",
"on",
"the",
"service",
"by",
"underlying",
"invoker",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/AbstractInvoker.java#L22-L33 |
6,741 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/ParseError.java | ParseError.reset | public void reset() {
this.errorType = ErrorType.NONE;
this.message = null;
this.columnName = null;
this.columnValue = null;
this.columnType = null;
this.line = null;
this.lineNumber = 0;
this.linePos = 0;
} | java | public void reset() {
this.errorType = ErrorType.NONE;
this.message = null;
this.columnName = null;
this.columnValue = null;
this.columnType = null;
this.line = null;
this.lineNumber = 0;
this.linePos = 0;
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"errorType",
"=",
"ErrorType",
".",
"NONE",
";",
"this",
".",
"message",
"=",
"null",
";",
"this",
".",
"columnName",
"=",
"null",
";",
"this",
".",
"columnValue",
"=",
"null",
";",
"this",
".",
... | Resets all of the fields to non-error status. This is used internally so we can reuse an instance of this class. | [
"Resets",
"all",
"of",
"the",
"fields",
"to",
"non",
"-",
"error",
"status",
".",
"This",
"is",
"used",
"internally",
"so",
"we",
"can",
"reuse",
"an",
"instance",
"of",
"this",
"class",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/ParseError.java#L122-L131 |
6,742 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/ColumnInfo.java | ColumnInfo.getValue | public T getValue(Object obj) throws IllegalAccessException, InvocationTargetException {
if (field == null) {
@SuppressWarnings("unchecked")
T cast = (T) getMethod.invoke(obj);
return cast;
} else {
@SuppressWarnings("unchecked")
T cast = (T) field.get(obj);
return cast;
}
} | java | public T getValue(Object obj) throws IllegalAccessException, InvocationTargetException {
if (field == null) {
@SuppressWarnings("unchecked")
T cast = (T) getMethod.invoke(obj);
return cast;
} else {
@SuppressWarnings("unchecked")
T cast = (T) field.get(obj);
return cast;
}
} | [
"public",
"T",
"getValue",
"(",
"Object",
"obj",
")",
"throws",
"IllegalAccessException",
",",
"InvocationTargetException",
"{",
"if",
"(",
"field",
"==",
"null",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"T",
"cast",
"=",
"(",
"T",
")",
... | Get the value associated with this field from the object parameter either by getting from the field or calling
the get method. | [
"Get",
"the",
"value",
"associated",
"with",
"this",
"field",
"from",
"the",
"object",
"parameter",
"either",
"by",
"getting",
"from",
"the",
"field",
"or",
"calling",
"the",
"get",
"method",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/ColumnInfo.java#L69-L79 |
6,743 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/ColumnInfo.java | ColumnInfo.setValue | public void setValue(Object obj, T value) throws IllegalAccessException, InvocationTargetException {
if (field == null) {
setMethod.invoke(obj, value);
} else {
field.set(obj, value);
}
} | java | public void setValue(Object obj, T value) throws IllegalAccessException, InvocationTargetException {
if (field == null) {
setMethod.invoke(obj, value);
} else {
field.set(obj, value);
}
} | [
"public",
"void",
"setValue",
"(",
"Object",
"obj",
",",
"T",
"value",
")",
"throws",
"IllegalAccessException",
",",
"InvocationTargetException",
"{",
"if",
"(",
"field",
"==",
"null",
")",
"{",
"setMethod",
".",
"invoke",
"(",
"obj",
",",
"value",
")",
";... | Set the value associated with this field from the object parameter either by setting via the field or calling the
set method. | [
"Set",
"the",
"value",
"associated",
"with",
"this",
"field",
"from",
"the",
"object",
"parameter",
"either",
"by",
"setting",
"via",
"the",
"field",
"or",
"calling",
"the",
"set",
"method",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/ColumnInfo.java#L85-L91 |
6,744 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/UnitOfWorkInvokerFactory.java | UnitOfWorkInvokerFactory.create | public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) {
ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder =
new ImmutableMap.Builder<>();
for (Method m : service.getClass().getMethods()) {
if (m.isAnnotationPresent(UnitOfW... | java | public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) {
ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder =
new ImmutableMap.Builder<>();
for (Method m : service.getClass().getMethods()) {
if (m.isAnnotationPresent(UnitOfW... | [
"public",
"Invoker",
"create",
"(",
"Object",
"service",
",",
"Invoker",
"rootInvoker",
",",
"SessionFactory",
"sessionFactory",
")",
"{",
"ImmutableMap",
".",
"Builder",
"<",
"String",
",",
"UnitOfWork",
">",
"unitOfWorkMethodsBuilder",
"=",
"new",
"ImmutableMap",
... | Factory method for creating UnitOfWorkInvoker. | [
"Factory",
"method",
"for",
"creating",
"UnitOfWorkInvoker",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/UnitOfWorkInvokerFactory.java#L15-L34 |
6,745 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/AbstractBuilder.java | AbstractBuilder.cxfOutFaultInterceptors | @SuppressWarnings("unchecked")
public AbstractBuilder cxfOutFaultInterceptors(Interceptor<? extends Message> ... interceptors) {
this.cxfOutFaultInterceptors =
ImmutableList.<Interceptor<? extends Message>>builder()
.add(interceptors).build();
return this;
... | java | @SuppressWarnings("unchecked")
public AbstractBuilder cxfOutFaultInterceptors(Interceptor<? extends Message> ... interceptors) {
this.cxfOutFaultInterceptors =
ImmutableList.<Interceptor<? extends Message>>builder()
.add(interceptors).build();
return this;
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"AbstractBuilder",
"cxfOutFaultInterceptors",
"(",
"Interceptor",
"<",
"?",
"extends",
"Message",
">",
"...",
"interceptors",
")",
"{",
"this",
".",
"cxfOutFaultInterceptors",
"=",
"ImmutableList",
".",
"... | Add CXF interceptors to the outgoing fault interceptor chain.
@param interceptors CXF interceptors.
@return EndpointBuilder instance. | [
"Add",
"CXF",
"interceptors",
"to",
"the",
"outgoing",
"fault",
"interceptor",
"chain",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/AbstractBuilder.java#L82-L88 |
6,746 | j256/simplecsv | src/main/java/com/j256/simplecsv/converter/ConverterUtils.java | ConverterUtils.addInternalConverters | public static void addInternalConverters(Map<Class<?>, Converter<?, ?>> converterMap) {
converterMap.put(BigDecimal.class, BigDecimalConverter.getSingleton());
converterMap.put(BigInteger.class, BigIntegerConverter.getSingleton());
converterMap.put(Boolean.class, BooleanConverter.getSingleton());
converterMap.p... | java | public static void addInternalConverters(Map<Class<?>, Converter<?, ?>> converterMap) {
converterMap.put(BigDecimal.class, BigDecimalConverter.getSingleton());
converterMap.put(BigInteger.class, BigIntegerConverter.getSingleton());
converterMap.put(Boolean.class, BooleanConverter.getSingleton());
converterMap.p... | [
"public",
"static",
"void",
"addInternalConverters",
"(",
"Map",
"<",
"Class",
"<",
"?",
">",
",",
"Converter",
"<",
"?",
",",
"?",
">",
">",
"converterMap",
")",
"{",
"converterMap",
".",
"put",
"(",
"BigDecimal",
".",
"class",
",",
"BigDecimalConverter",... | Add internal converters to the map. | [
"Add",
"internal",
"converters",
"to",
"the",
"map",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/converter/ConverterUtils.java#L20-L43 |
6,747 | j256/simplecsv | src/main/java/com/j256/simplecsv/converter/ConverterUtils.java | ConverterUtils.constructConverter | public static Converter<?, ?> constructConverter(Class<? extends Converter<?, ?>> clazz) {
Constructor<? extends Converter<?, ?>> constructor;
try {
constructor = clazz.getConstructor();
} catch (Exception e) {
throw new IllegalArgumentException("Could not find public no-arg constructor for CSV converter cl... | java | public static Converter<?, ?> constructConverter(Class<? extends Converter<?, ?>> clazz) {
Constructor<? extends Converter<?, ?>> constructor;
try {
constructor = clazz.getConstructor();
} catch (Exception e) {
throw new IllegalArgumentException("Could not find public no-arg constructor for CSV converter cl... | [
"public",
"static",
"Converter",
"<",
"?",
",",
"?",
">",
"constructConverter",
"(",
"Class",
"<",
"?",
"extends",
"Converter",
"<",
"?",
",",
"?",
">",
">",
"clazz",
")",
"{",
"Constructor",
"<",
"?",
"extends",
"Converter",
"<",
"?",
",",
"?",
">",... | Construct a converter instance. | [
"Construct",
"a",
"converter",
"instance",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/converter/ConverterUtils.java#L48-L61 |
6,748 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSBundle.java | JAXWSBundle.publishEndpoint | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) {
checkArgument(endpointBuilder != null, "EndpointBuilder is null");
return this.jaxwsEnvironment.publishEndpoint(endpointBuilder);
} | java | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) {
checkArgument(endpointBuilder != null, "EndpointBuilder is null");
return this.jaxwsEnvironment.publishEndpoint(endpointBuilder);
} | [
"public",
"Endpoint",
"publishEndpoint",
"(",
"EndpointBuilder",
"endpointBuilder",
")",
"{",
"checkArgument",
"(",
"endpointBuilder",
"!=",
"null",
",",
"\"EndpointBuilder is null\"",
")",
";",
"return",
"this",
".",
"jaxwsEnvironment",
".",
"publishEndpoint",
"(",
"... | Publish JAX-WS endpoint. Endpoint will be published relative to the CXF servlet path.
@param endpointBuilder EndpointBuilder.
@return javax.xml.ws.Endpoint | [
"Publish",
"JAX",
"-",
"WS",
"endpoint",
".",
"Endpoint",
"will",
"be",
"published",
"relative",
"to",
"the",
"CXF",
"servlet",
"path",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSBundle.java#L83-L86 |
6,749 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSBundle.java | JAXWSBundle.getClient | public <T> T getClient(ClientBuilder<T> clientBuilder) {
checkArgument(clientBuilder != null, "ClientBuilder is null");
return jaxwsEnvironment.getClient(clientBuilder);
} | java | public <T> T getClient(ClientBuilder<T> clientBuilder) {
checkArgument(clientBuilder != null, "ClientBuilder is null");
return jaxwsEnvironment.getClient(clientBuilder);
} | [
"public",
"<",
"T",
">",
"T",
"getClient",
"(",
"ClientBuilder",
"<",
"T",
">",
"clientBuilder",
")",
"{",
"checkArgument",
"(",
"clientBuilder",
"!=",
"null",
",",
"\"ClientBuilder is null\"",
")",
";",
"return",
"jaxwsEnvironment",
".",
"getClient",
"(",
"cl... | Factory method for creating JAX-WS clients.
@param clientBuilder ClientBuilder.
@param <T> Service interface type.
@return Client proxy. | [
"Factory",
"method",
"for",
"creating",
"JAX",
"-",
"WS",
"clients",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSBundle.java#L176-L179 |
6,750 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/InstrumentedInvokerFactory.java | InstrumentedInvokerFactory.timed | private Invoker timed(Invoker invoker, List<Method> timedMethods) {
ImmutableMap.Builder<String, Timer> timers = new ImmutableMap.Builder<>();
for (Method m : timedMethods) {
Timed annotation = m.getAnnotation(Timed.class);
final String name = chooseName(annotation.name(), anno... | java | private Invoker timed(Invoker invoker, List<Method> timedMethods) {
ImmutableMap.Builder<String, Timer> timers = new ImmutableMap.Builder<>();
for (Method m : timedMethods) {
Timed annotation = m.getAnnotation(Timed.class);
final String name = chooseName(annotation.name(), anno... | [
"private",
"Invoker",
"timed",
"(",
"Invoker",
"invoker",
",",
"List",
"<",
"Method",
">",
"timedMethods",
")",
"{",
"ImmutableMap",
".",
"Builder",
"<",
"String",
",",
"Timer",
">",
"timers",
"=",
"new",
"ImmutableMap",
".",
"Builder",
"<>",
"(",
")",
"... | Factory method for TimedInvoker. | [
"Factory",
"method",
"for",
"TimedInvoker",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/InstrumentedInvokerFactory.java#L28-L40 |
6,751 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/InstrumentedInvokerFactory.java | InstrumentedInvokerFactory.metered | private Invoker metered(Invoker invoker, List<Method> meteredMethods) {
ImmutableMap.Builder<String, Meter> meters = new ImmutableMap.Builder<>();
for (Method m : meteredMethods) {
Metered annotation = m.getAnnotation(Metered.class);
final String name = chooseName(annotation.na... | java | private Invoker metered(Invoker invoker, List<Method> meteredMethods) {
ImmutableMap.Builder<String, Meter> meters = new ImmutableMap.Builder<>();
for (Method m : meteredMethods) {
Metered annotation = m.getAnnotation(Metered.class);
final String name = chooseName(annotation.na... | [
"private",
"Invoker",
"metered",
"(",
"Invoker",
"invoker",
",",
"List",
"<",
"Method",
">",
"meteredMethods",
")",
"{",
"ImmutableMap",
".",
"Builder",
"<",
"String",
",",
"Meter",
">",
"meters",
"=",
"new",
"ImmutableMap",
".",
"Builder",
"<>",
"(",
")",... | Factory method for MeteredInvoker. | [
"Factory",
"method",
"for",
"MeteredInvoker",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/InstrumentedInvokerFactory.java#L45-L57 |
6,752 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/InstrumentedInvokerFactory.java | InstrumentedInvokerFactory.exceptionMetered | private Invoker exceptionMetered(Invoker invoker, List<Method> meteredMethods) {
ImmutableMap.Builder<String, InstrumentedInvokers.ExceptionMeter> meters =
new ImmutableMap.Builder<>();
for (Method m : meteredMethods) {
ExceptionMetered annotation = m.getAnnotation(Excepti... | java | private Invoker exceptionMetered(Invoker invoker, List<Method> meteredMethods) {
ImmutableMap.Builder<String, InstrumentedInvokers.ExceptionMeter> meters =
new ImmutableMap.Builder<>();
for (Method m : meteredMethods) {
ExceptionMetered annotation = m.getAnnotation(Excepti... | [
"private",
"Invoker",
"exceptionMetered",
"(",
"Invoker",
"invoker",
",",
"List",
"<",
"Method",
">",
"meteredMethods",
")",
"{",
"ImmutableMap",
".",
"Builder",
"<",
"String",
",",
"InstrumentedInvokers",
".",
"ExceptionMeter",
">",
"meters",
"=",
"new",
"Immut... | Factory method for ExceptionMeteredInvoker. | [
"Factory",
"method",
"for",
"ExceptionMeteredInvoker",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/InstrumentedInvokerFactory.java#L62-L80 |
6,753 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/InstrumentedInvokerFactory.java | InstrumentedInvokerFactory.create | public Invoker create(Object service, Invoker rootInvoker) {
List<Method> timedmethods = new ArrayList<>();
List<Method> meteredmethods = new ArrayList<>();
List<Method> exceptionmeteredmethods = new ArrayList<>();
for (Method m : service.getClass().getMethods()) {
if (m.i... | java | public Invoker create(Object service, Invoker rootInvoker) {
List<Method> timedmethods = new ArrayList<>();
List<Method> meteredmethods = new ArrayList<>();
List<Method> exceptionmeteredmethods = new ArrayList<>();
for (Method m : service.getClass().getMethods()) {
if (m.i... | [
"public",
"Invoker",
"create",
"(",
"Object",
"service",
",",
"Invoker",
"rootInvoker",
")",
"{",
"List",
"<",
"Method",
">",
"timedmethods",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"List",
"<",
"Method",
">",
"meteredmethods",
"=",
"new",
"ArrayList... | Factory method for creating instrumented invoker chain. | [
"Factory",
"method",
"for",
"creating",
"instrumented",
"invoker",
"chain",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/InstrumentedInvokerFactory.java#L107-L143 |
6,754 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSEnvironment.java | JAXWSEnvironment.publishEndpoint | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) {
checkArgument(endpointBuilder != null, "EndpointBuilder is null");
EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService());
if(endpointBuilder.publishedEndpointUrl() != null) {
cxfendpoint.setP... | java | public Endpoint publishEndpoint(EndpointBuilder endpointBuilder) {
checkArgument(endpointBuilder != null, "EndpointBuilder is null");
EndpointImpl cxfendpoint = new EndpointImpl(bus, endpointBuilder.getService());
if(endpointBuilder.publishedEndpointUrl() != null) {
cxfendpoint.setP... | [
"public",
"Endpoint",
"publishEndpoint",
"(",
"EndpointBuilder",
"endpointBuilder",
")",
"{",
"checkArgument",
"(",
"endpointBuilder",
"!=",
"null",
",",
"\"EndpointBuilder is null\"",
")",
";",
"EndpointImpl",
"cxfendpoint",
"=",
"new",
"EndpointImpl",
"(",
"bus",
",... | Publish JAX-WS server side endpoint. Returns javax.xml.ws.Endpoint to enable further customization. | [
"Publish",
"JAX",
"-",
"WS",
"server",
"side",
"endpoint",
".",
"Returns",
"javax",
".",
"xml",
".",
"ws",
".",
"Endpoint",
"to",
"enable",
"further",
"customization",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSEnvironment.java#L103-L169 |
6,755 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSEnvironment.java | JAXWSEnvironment.getClient | public <T> T getClient(ClientBuilder<T> clientBuilder) {
JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
proxyFactory.setServiceClass(clientBuilder.getServiceClass());
proxyFactory.setAddress(clientBuilder.getAddress());
// JAX-WS handlers
if (clientBuilder.ge... | java | public <T> T getClient(ClientBuilder<T> clientBuilder) {
JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
proxyFactory.setServiceClass(clientBuilder.getServiceClass());
proxyFactory.setAddress(clientBuilder.getAddress());
// JAX-WS handlers
if (clientBuilder.ge... | [
"public",
"<",
"T",
">",
"T",
"getClient",
"(",
"ClientBuilder",
"<",
"T",
">",
"clientBuilder",
")",
"{",
"JaxWsProxyFactoryBean",
"proxyFactory",
"=",
"new",
"JaxWsProxyFactoryBean",
"(",
")",
";",
"proxyFactory",
".",
"setServiceClass",
"(",
"clientBuilder",
... | JAX-WS client factory
@param clientBuilder ClientBuilder.
@param <T> Service interface type.
@return JAX-WS client proxy. | [
"JAX",
"-",
"WS",
"client",
"factory"
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSEnvironment.java#L177-L224 |
6,756 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.readAll | public List<T> readAll(File file, Collection<ParseError> parseErrors) throws IOException, ParseException {
checkEntityConfig();
return readAll(new FileReader(file), parseErrors);
} | java | public List<T> readAll(File file, Collection<ParseError> parseErrors) throws IOException, ParseException {
checkEntityConfig();
return readAll(new FileReader(file), parseErrors);
} | [
"public",
"List",
"<",
"T",
">",
"readAll",
"(",
"File",
"file",
",",
"Collection",
"<",
"ParseError",
">",
"parseErrors",
")",
"throws",
"IOException",
",",
"ParseException",
"{",
"checkEntityConfig",
"(",
")",
";",
"return",
"readAll",
"(",
"new",
"FileRea... | Read in all of the entities in the file passed in.
@param file
Where to read the header and entities from. It will be closed when the method returns.
@param parseErrors
If not null, any errors will be added to the collection and null will be returned. If validateHeader
is true and the header does not match then no add... | [
"Read",
"in",
"all",
"of",
"the",
"entities",
"in",
"the",
"file",
"passed",
"in",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L156-L159 |
6,757 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.readAll | public List<T> readAll(Reader reader, Collection<ParseError> parseErrors) throws IOException, ParseException {
checkEntityConfig();
BufferedReader bufferedReader = new BufferedReaderLineCounter(reader);
try {
ParseError parseError = null;
// we do this to reuse the parse error objects if we can
if (parse... | java | public List<T> readAll(Reader reader, Collection<ParseError> parseErrors) throws IOException, ParseException {
checkEntityConfig();
BufferedReader bufferedReader = new BufferedReaderLineCounter(reader);
try {
ParseError parseError = null;
// we do this to reuse the parse error objects if we can
if (parse... | [
"public",
"List",
"<",
"T",
">",
"readAll",
"(",
"Reader",
"reader",
",",
"Collection",
"<",
"ParseError",
">",
"parseErrors",
")",
"throws",
"IOException",
",",
"ParseException",
"{",
"checkEntityConfig",
"(",
")",
";",
"BufferedReader",
"bufferedReader",
"=",
... | Read in all of the entities in the reader passed in. It will use an internal buffered reader.
@param reader
Where to read the header and entities from. It will be closed when the method returns.
@param parseErrors
If not null, any errors will be added to the collection and null will be returned. If validateHeader
is t... | [
"Read",
"in",
"all",
"of",
"the",
"entities",
"in",
"the",
"reader",
"passed",
"in",
".",
"It",
"will",
"use",
"an",
"internal",
"buffered",
"reader",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L177-L198 |
6,758 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.readHeader | public String[] readHeader(BufferedReader bufferedReader, ParseError parseError)
throws ParseException, IOException {
checkEntityConfig();
String header = bufferedReader.readLine();
if (header == null) {
if (parseError == null) {
throw new ParseException("no header line read", 0);
} else {
parseE... | java | public String[] readHeader(BufferedReader bufferedReader, ParseError parseError)
throws ParseException, IOException {
checkEntityConfig();
String header = bufferedReader.readLine();
if (header == null) {
if (parseError == null) {
throw new ParseException("no header line read", 0);
} else {
parseE... | [
"public",
"String",
"[",
"]",
"readHeader",
"(",
"BufferedReader",
"bufferedReader",
",",
"ParseError",
"parseError",
")",
"throws",
"ParseException",
",",
"IOException",
"{",
"checkEntityConfig",
"(",
")",
";",
"String",
"header",
"=",
"bufferedReader",
".",
"rea... | Read in a line and process it as a CSV header.
@param bufferedReader
Where to read the header from. It needs to be closed by the caller. Consider using
{@link BufferedReaderLineCounter} to populate the line-number for parse errors.
@param parseError
If not null, this will be set with the first parse error and it will ... | [
"Read",
"in",
"a",
"line",
"and",
"process",
"it",
"as",
"a",
"CSV",
"header",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L216-L240 |
6,759 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.readRows | public List<T> readRows(BufferedReader bufferedReader, Collection<ParseError> parseErrors)
throws IOException, ParseException {
checkEntityConfig();
ParseError parseError = null;
// we do this to reuse the parse error objects if we can
if (parseErrors != null) {
parseError = new ParseError();
}
List<T... | java | public List<T> readRows(BufferedReader bufferedReader, Collection<ParseError> parseErrors)
throws IOException, ParseException {
checkEntityConfig();
ParseError parseError = null;
// we do this to reuse the parse error objects if we can
if (parseErrors != null) {
parseError = new ParseError();
}
List<T... | [
"public",
"List",
"<",
"T",
">",
"readRows",
"(",
"BufferedReader",
"bufferedReader",
",",
"Collection",
"<",
"ParseError",
">",
"parseErrors",
")",
"throws",
"IOException",
",",
"ParseException",
"{",
"checkEntityConfig",
"(",
")",
";",
"ParseError",
"parseError"... | Read in all of the entities in the reader passed in but without the header.
@param bufferedReader
Where to read the entries from. It needs to be closed by the caller. Consider using
{@link BufferedReaderLineCounter} to populate the line-number for parse errors.
@param parseErrors
If not null, any errors will be added ... | [
"Read",
"in",
"all",
"of",
"the",
"entities",
"in",
"the",
"reader",
"passed",
"in",
"but",
"without",
"the",
"header",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L259-L285 |
6,760 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.readRow | public T readRow(BufferedReader bufferedReader, ParseError parseError) throws ParseException, IOException {
checkEntityConfig();
String line = bufferedReader.readLine();
if (line == null) {
return null;
} else {
return processRow(line, bufferedReader, parseError, getLineNumber(bufferedReader));
}
} | java | public T readRow(BufferedReader bufferedReader, ParseError parseError) throws ParseException, IOException {
checkEntityConfig();
String line = bufferedReader.readLine();
if (line == null) {
return null;
} else {
return processRow(line, bufferedReader, parseError, getLineNumber(bufferedReader));
}
} | [
"public",
"T",
"readRow",
"(",
"BufferedReader",
"bufferedReader",
",",
"ParseError",
"parseError",
")",
"throws",
"ParseException",
",",
"IOException",
"{",
"checkEntityConfig",
"(",
")",
";",
"String",
"line",
"=",
"bufferedReader",
".",
"readLine",
"(",
")",
... | Read an entity line from the reader.
@param bufferedReader
Where to read the row from. It needs to be closed by the caller. Consider using
{@link BufferedReaderLineCounter} to populate the line-number for parse errors.
@param parseError
If not null, this will be set with the first parse error and it will return null. ... | [
"Read",
"an",
"entity",
"line",
"from",
"the",
"reader",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L304-L312 |
6,761 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.validateHeader | public boolean validateHeader(String line, ParseError parseError) throws ParseException {
checkEntityConfig();
String[] columns = processHeader(line, parseError);
return validateHeaderColumns(columns, parseError, 1);
} | java | public boolean validateHeader(String line, ParseError parseError) throws ParseException {
checkEntityConfig();
String[] columns = processHeader(line, parseError);
return validateHeaderColumns(columns, parseError, 1);
} | [
"public",
"boolean",
"validateHeader",
"(",
"String",
"line",
",",
"ParseError",
"parseError",
")",
"throws",
"ParseException",
"{",
"checkEntityConfig",
"(",
")",
";",
"String",
"[",
"]",
"columns",
"=",
"processHeader",
"(",
"line",
",",
"parseError",
")",
"... | Validate the header row against the configured header columns.
@param line
Line to process to get our validate our header.
@param parseError
If not null, this will be set with the first parse error and it will return null. If this is null then
a ParseException will be thrown instead.
@return true if the header matched... | [
"Validate",
"the",
"header",
"row",
"against",
"the",
"configured",
"header",
"columns",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L327-L331 |
6,762 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.processHeader | public String[] processHeader(String line, ParseError parseError) throws ParseException {
checkEntityConfig();
try {
return processHeader(line, parseError, 1);
} catch (IOException e) {
// this won't happen because processRow won't do any IO
return null;
}
} | java | public String[] processHeader(String line, ParseError parseError) throws ParseException {
checkEntityConfig();
try {
return processHeader(line, parseError, 1);
} catch (IOException e) {
// this won't happen because processRow won't do any IO
return null;
}
} | [
"public",
"String",
"[",
"]",
"processHeader",
"(",
"String",
"line",
",",
"ParseError",
"parseError",
")",
"throws",
"ParseException",
"{",
"checkEntityConfig",
"(",
")",
";",
"try",
"{",
"return",
"processHeader",
"(",
"line",
",",
"parseError",
",",
"1",
... | Process a header line and divide it up into a series of quoted columns.
@param line
Line to process looking for header.
@param parseError
If not null, this will be set with the first parse error and it will return null. If this is null then
a ParseException will be thrown instead.
@return Returns an array of processed... | [
"Process",
"a",
"header",
"line",
"and",
"divide",
"it",
"up",
"into",
"a",
"series",
"of",
"quoted",
"columns",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L365-L373 |
6,763 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.processRow | public T processRow(String line, ParseError parseError) throws ParseException {
checkEntityConfig();
try {
return processRow(line, null, parseError, 1);
} catch (IOException e) {
// this won't happen because processRow won't do any IO
return null;
}
} | java | public T processRow(String line, ParseError parseError) throws ParseException {
checkEntityConfig();
try {
return processRow(line, null, parseError, 1);
} catch (IOException e) {
// this won't happen because processRow won't do any IO
return null;
}
} | [
"public",
"T",
"processRow",
"(",
"String",
"line",
",",
"ParseError",
"parseError",
")",
"throws",
"ParseException",
"{",
"checkEntityConfig",
"(",
")",
";",
"try",
"{",
"return",
"processRow",
"(",
"line",
",",
"null",
",",
"parseError",
",",
"1",
")",
"... | Read and process a line and return the associated entity.
@param line
to process to build our entity.
@param parseError
If not null, this will be set with the first parse error and it will return null. If this is null then
a ParseException will be thrown instead.
@return Returns a processed entity or null if an error ... | [
"Read",
"and",
"process",
"a",
"line",
"and",
"return",
"the",
"associated",
"entity",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L388-L396 |
6,764 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.writeAll | public void writeAll(File file, Collection<T> entities, boolean writeHeader) throws IOException {
writeAll(new FileWriter(file), entities, writeHeader);
} | java | public void writeAll(File file, Collection<T> entities, boolean writeHeader) throws IOException {
writeAll(new FileWriter(file), entities, writeHeader);
} | [
"public",
"void",
"writeAll",
"(",
"File",
"file",
",",
"Collection",
"<",
"T",
">",
"entities",
",",
"boolean",
"writeHeader",
")",
"throws",
"IOException",
"{",
"writeAll",
"(",
"new",
"FileWriter",
"(",
"file",
")",
",",
"entities",
",",
"writeHeader",
... | Write a collection of entities to the writer.
@param file
Where to write the header and entities.
@param entities
Collection of entities to write to the writer.
@param writeHeader
Set to true to write header at the start of the output file.
@throws IOException
If there are any IO exceptions thrown when writing. | [
"Write",
"a",
"collection",
"of",
"entities",
"to",
"the",
"writer",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L410-L412 |
6,765 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.writeAll | public void writeAll(Writer writer, Collection<T> entities, boolean writeHeader) throws IOException {
checkEntityConfig();
BufferedWriter bufferedWriter = new BufferedWriter(writer);
try {
if (writeHeader) {
writeHeader(bufferedWriter, true);
}
for (T entity : entities) {
writeRow(bufferedWriter,... | java | public void writeAll(Writer writer, Collection<T> entities, boolean writeHeader) throws IOException {
checkEntityConfig();
BufferedWriter bufferedWriter = new BufferedWriter(writer);
try {
if (writeHeader) {
writeHeader(bufferedWriter, true);
}
for (T entity : entities) {
writeRow(bufferedWriter,... | [
"public",
"void",
"writeAll",
"(",
"Writer",
"writer",
",",
"Collection",
"<",
"T",
">",
"entities",
",",
"boolean",
"writeHeader",
")",
"throws",
"IOException",
"{",
"checkEntityConfig",
"(",
")",
";",
"BufferedWriter",
"bufferedWriter",
"=",
"new",
"BufferedWr... | Write a header and then the collection of entities to the writer.
@param writer
Where to write the header and entities. It will be closed before this method returns.
@param entities
Collection of entities to write to the writer.
@param writeHeader
Set to true to write header at the start of the writer.
@throws IOExcep... | [
"Write",
"a",
"header",
"and",
"then",
"the",
"collection",
"of",
"entities",
"to",
"the",
"writer",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L426-L439 |
6,766 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.writeHeader | public void writeHeader(BufferedWriter bufferedWriter, boolean appendLineTermination) throws IOException {
checkEntityConfig();
bufferedWriter.write(buildHeaderLine(appendLineTermination));
} | java | public void writeHeader(BufferedWriter bufferedWriter, boolean appendLineTermination) throws IOException {
checkEntityConfig();
bufferedWriter.write(buildHeaderLine(appendLineTermination));
} | [
"public",
"void",
"writeHeader",
"(",
"BufferedWriter",
"bufferedWriter",
",",
"boolean",
"appendLineTermination",
")",
"throws",
"IOException",
"{",
"checkEntityConfig",
"(",
")",
";",
"bufferedWriter",
".",
"write",
"(",
"buildHeaderLine",
"(",
"appendLineTermination"... | Write the header line to the writer.
@param bufferedWriter
Where to write our header information.
@param appendLineTermination
Set to true to add the newline to the end of the line.
@throws IOException
If there are any IO exceptions thrown when writing. | [
"Write",
"the",
"header",
"line",
"to",
"the",
"writer",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L451-L454 |
6,767 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.writeRow | public void writeRow(BufferedWriter bufferedWriter, T entity, boolean appendLineTermination) throws IOException {
checkEntityConfig();
String line = buildLine(entity, appendLineTermination);
bufferedWriter.write(line);
} | java | public void writeRow(BufferedWriter bufferedWriter, T entity, boolean appendLineTermination) throws IOException {
checkEntityConfig();
String line = buildLine(entity, appendLineTermination);
bufferedWriter.write(line);
} | [
"public",
"void",
"writeRow",
"(",
"BufferedWriter",
"bufferedWriter",
",",
"T",
"entity",
",",
"boolean",
"appendLineTermination",
")",
"throws",
"IOException",
"{",
"checkEntityConfig",
"(",
")",
";",
"String",
"line",
"=",
"buildLine",
"(",
"entity",
",",
"ap... | Write an entity row to the writer.
@param bufferedWriter
Where to write our header information.
@param entity
The entity we are writing to the buffered writer.
@param appendLineTermination
Set to true to add the newline to the end of the line.
@throws IOException
If there are any IO exceptions thrown when writing. | [
"Write",
"an",
"entity",
"row",
"to",
"the",
"writer",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L468-L472 |
6,768 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.buildHeaderLine | public String buildHeaderLine(boolean appendLineTermination) {
checkEntityConfig();
StringBuilder sb = new StringBuilder();
boolean first = true;
for (ColumnInfo<?> columnInfo : allColumnInfos) {
if (first) {
first = false;
} else {
sb.append(columnSeparator);
}
String header = columnInfo.ge... | java | public String buildHeaderLine(boolean appendLineTermination) {
checkEntityConfig();
StringBuilder sb = new StringBuilder();
boolean first = true;
for (ColumnInfo<?> columnInfo : allColumnInfos) {
if (first) {
first = false;
} else {
sb.append(columnSeparator);
}
String header = columnInfo.ge... | [
"public",
"String",
"buildHeaderLine",
"(",
"boolean",
"appendLineTermination",
")",
"{",
"checkEntityConfig",
"(",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"first",
"=",
"true",
";",
"for",
"(",
"ColumnInfo",
"<"... | Build and return a header string made up of quoted column names.
@param appendLineTermination
Set to true to add the newline to the end of the line. | [
"Build",
"and",
"return",
"a",
"header",
"string",
"made",
"up",
"of",
"quoted",
"column",
"names",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L480-L504 |
6,769 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.buildLine | public String buildLine(T entity, boolean appendLineTermination) {
checkEntityConfig();
StringBuilder sb = new StringBuilder();
boolean first = true;
for (ColumnInfo<Object> columnInfo : allColumnInfos) {
if (first) {
first = false;
} else {
sb.append(columnSeparator);
}
Object value;
try... | java | public String buildLine(T entity, boolean appendLineTermination) {
checkEntityConfig();
StringBuilder sb = new StringBuilder();
boolean first = true;
for (ColumnInfo<Object> columnInfo : allColumnInfos) {
if (first) {
first = false;
} else {
sb.append(columnSeparator);
}
Object value;
try... | [
"public",
"String",
"buildLine",
"(",
"T",
"entity",
",",
"boolean",
"appendLineTermination",
")",
"{",
"checkEntityConfig",
"(",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"first",
"=",
"true",
";",
"for",
"(",
... | Convert the entity into a string of column values.
@param appendLineTermination
Set to true to add the newline to the end of the line. | [
"Convert",
"the",
"entity",
"into",
"a",
"string",
"of",
"column",
"values",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L512-L564 |
6,770 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.extractAndAssignValue | private void extractAndAssignValue(String line, int lineNumber, ColumnInfo<Object> columnInfo, String columnStr,
int linePos, Object target, ParseError parseError) {
Object value = extractValue(line, lineNumber, columnInfo, columnStr, linePos, target, parseError);
if (value == null) {
assignParseErrorFields(p... | java | private void extractAndAssignValue(String line, int lineNumber, ColumnInfo<Object> columnInfo, String columnStr,
int linePos, Object target, ParseError parseError) {
Object value = extractValue(line, lineNumber, columnInfo, columnStr, linePos, target, parseError);
if (value == null) {
assignParseErrorFields(p... | [
"private",
"void",
"extractAndAssignValue",
"(",
"String",
"line",
",",
"int",
"lineNumber",
",",
"ColumnInfo",
"<",
"Object",
">",
"columnInfo",
",",
"String",
"columnStr",
",",
"int",
"linePos",
",",
"Object",
"target",
",",
"ParseError",
"parseError",
")",
... | Extract a value from the line, convert it into its java equivalent, and assign it to our target object. | [
"Extract",
"a",
"value",
"from",
"the",
"line",
"convert",
"it",
"into",
"its",
"java",
"equivalent",
"and",
"assign",
"it",
"to",
"our",
"target",
"object",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L1418-L1435 |
6,771 | j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.extractValue | private Object extractValue(String line, int lineNumber, ColumnInfo<Object> columnInfo, String columnStr,
int linePos, Object target, ParseError parseError) {
Converter<Object, ?> converter = columnInfo.getConverter();
if (alwaysTrimInput || columnInfo.isTrimInput() || converter.isAlwaysTrimInput()) {
column... | java | private Object extractValue(String line, int lineNumber, ColumnInfo<Object> columnInfo, String columnStr,
int linePos, Object target, ParseError parseError) {
Converter<Object, ?> converter = columnInfo.getConverter();
if (alwaysTrimInput || columnInfo.isTrimInput() || converter.isAlwaysTrimInput()) {
column... | [
"private",
"Object",
"extractValue",
"(",
"String",
"line",
",",
"int",
"lineNumber",
",",
"ColumnInfo",
"<",
"Object",
">",
"columnInfo",
",",
"String",
"columnStr",
",",
"int",
"linePos",
",",
"Object",
"target",
",",
"ParseError",
"parseError",
")",
"{",
... | Extract a value from the line and convert it into its java equivalent. | [
"Extract",
"a",
"value",
"from",
"the",
"line",
"and",
"convert",
"it",
"into",
"its",
"java",
"equivalent",
"."
] | 964fe53073c43e2a311341e3f8fd2c94372f60cb | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L1440-L1471 |
6,772 | roskart/dropwizard-jaxws | dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/ClientBuilder.java | ClientBuilder.handlers | public ClientBuilder<T> handlers(Handler... handlers) {
this.handlers = ImmutableList.<Handler>builder().add(handlers).build();
return this;
} | java | public ClientBuilder<T> handlers(Handler... handlers) {
this.handlers = ImmutableList.<Handler>builder().add(handlers).build();
return this;
} | [
"public",
"ClientBuilder",
"<",
"T",
">",
"handlers",
"(",
"Handler",
"...",
"handlers",
")",
"{",
"this",
".",
"handlers",
"=",
"ImmutableList",
".",
"<",
"Handler",
">",
"builder",
"(",
")",
".",
"add",
"(",
"handlers",
")",
".",
"build",
"(",
")",
... | Add client side JAX-WS handlers.
@param handlers JAX-WS handlers.
@return ClientBuilder instance. | [
"Add",
"client",
"side",
"JAX",
"-",
"WS",
"handlers",
"."
] | 972eb63ba9626f3282d4a1d6127dc2b60b28f2bc | https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/ClientBuilder.java#L85-L88 |
6,773 | stokito/gag | gag-agent/src/main/java/com/github/stokito/gag/agent/GagTransformer.java | GagTransformer.premain | public static void premain(String args, Instrumentation inst) {
GagTransformer transformer = new GagTransformer();
if (args == null || args.length() == 0) {
transformer.addAllGenerators();
} else {
for (String key : args.split(",")) {
transformer.add... | java | public static void premain(String args, Instrumentation inst) {
GagTransformer transformer = new GagTransformer();
if (args == null || args.length() == 0) {
transformer.addAllGenerators();
} else {
for (String key : args.split(",")) {
transformer.add... | [
"public",
"static",
"void",
"premain",
"(",
"String",
"args",
",",
"Instrumentation",
"inst",
")",
"{",
"GagTransformer",
"transformer",
"=",
"new",
"GagTransformer",
"(",
")",
";",
"if",
"(",
"args",
"==",
"null",
"||",
"args",
".",
"length",
"(",
")",
... | An instrumentation agent needs to have a premain method. | [
"An",
"instrumentation",
"agent",
"needs",
"to",
"have",
"a",
"premain",
"method",
"."
] | a09cc41e499307aba88c0169d1eb4a2b1a65a161 | https://github.com/stokito/gag/blob/a09cc41e499307aba88c0169d1eb4a2b1a65a161/gag-agent/src/main/java/com/github/stokito/gag/agent/GagTransformer.java#L62-L72 |
6,774 | bartprokop/rxtx | src/main/java/gnu/io/RXTXCommDriver.java | RXTXCommDriver.initialize | @Override
public void initialize() {
deviceDirectory = getDeviceDirectory();
/*
First try to register ports specified in the properties
file. If that doesn't exist, then scan for ports.
*/
for (int PortType = CommPortIdentifier.PORT_SERIAL; PortType <= CommPortId... | java | @Override
public void initialize() {
deviceDirectory = getDeviceDirectory();
/*
First try to register ports specified in the properties
file. If that doesn't exist, then scan for ports.
*/
for (int PortType = CommPortIdentifier.PORT_SERIAL; PortType <= CommPortId... | [
"@",
"Override",
"public",
"void",
"initialize",
"(",
")",
"{",
"deviceDirectory",
"=",
"getDeviceDirectory",
"(",
")",
";",
"/*\n First try to register ports specified in the properties\n file. If that doesn't exist, then scan for ports.\n */",
"for",
"(",
... | Determine the OS and where the OS has the devices located | [
"Determine",
"the",
"OS",
"and",
"where",
"the",
"OS",
"has",
"the",
"devices",
"located"
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/RXTXCommDriver.java#L282-L297 |
6,775 | bartprokop/rxtx | src/main/java/gnu/io/CommPortIdentifier.java | CommPortIdentifier.AddIdentifierToList | private static void AddIdentifierToList(CommPortIdentifier cpi) {
LOGGER.fine("CommPortIdentifier:AddIdentifierToList()");
synchronized (Sync) {
if (CommPortIndex == null) {
CommPortIndex = cpi;
LOGGER.fine("CommPortIdentifier:AddIdentifierToList() null");
... | java | private static void AddIdentifierToList(CommPortIdentifier cpi) {
LOGGER.fine("CommPortIdentifier:AddIdentifierToList()");
synchronized (Sync) {
if (CommPortIndex == null) {
CommPortIndex = cpi;
LOGGER.fine("CommPortIdentifier:AddIdentifierToList() null");
... | [
"private",
"static",
"void",
"AddIdentifierToList",
"(",
"CommPortIdentifier",
"cpi",
")",
"{",
"LOGGER",
".",
"fine",
"(",
"\"CommPortIdentifier:AddIdentifierToList()\"",
")",
";",
"synchronized",
"(",
"Sync",
")",
"{",
"if",
"(",
"CommPortIndex",
"==",
"null",
"... | by implementing its own linked list functionallity | [
"by",
"implementing",
"its",
"own",
"linked",
"list",
"functionallity"
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/CommPortIdentifier.java#L201-L216 |
6,776 | bartprokop/rxtx | src/main/java/gnu/io/CommPortIdentifier.java | CommPortIdentifier.getPortIdentifier | static public CommPortIdentifier getPortIdentifier(CommPort p) throws NoSuchPortException {
LOGGER.fine("CommPortIdentifier:getPortIdentifier(CommPort)");
CommPortIdentifier c;
synchronized (Sync) {
c = CommPortIndex;
while (c != null && c.commPort != p) {
... | java | static public CommPortIdentifier getPortIdentifier(CommPort p) throws NoSuchPortException {
LOGGER.fine("CommPortIdentifier:getPortIdentifier(CommPort)");
CommPortIdentifier c;
synchronized (Sync) {
c = CommPortIndex;
while (c != null && c.commPort != p) {
... | [
"static",
"public",
"CommPortIdentifier",
"getPortIdentifier",
"(",
"CommPort",
"p",
")",
"throws",
"NoSuchPortException",
"{",
"LOGGER",
".",
"fine",
"(",
"\"CommPortIdentifier:getPortIdentifier(CommPort)\"",
")",
";",
"CommPortIdentifier",
"c",
";",
"synchronized",
"(",... | Gets communication port identifier
@param p - port for which identifier object is returned
@return - port identifier object
@throws NoSuchPortException - in case the non existing serial port found | [
"Gets",
"communication",
"port",
"identifier"
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/CommPortIdentifier.java#L315-L331 |
6,777 | bartprokop/rxtx | src/main/java/gnu/io/CommPortIdentifier.java | CommPortIdentifier.getPortIdentifiers | static public Enumeration<CommPortIdentifier> getPortIdentifiers() {
LOGGER.fine("static CommPortIdentifier:getPortIdentifiers()");
//Do not allow anybody get any ports while we are re-initializing
//because the CommPortIndex points to invalid instances during that time
synchronized (S... | java | static public Enumeration<CommPortIdentifier> getPortIdentifiers() {
LOGGER.fine("static CommPortIdentifier:getPortIdentifiers()");
//Do not allow anybody get any ports while we are re-initializing
//because the CommPortIndex points to invalid instances during that time
synchronized (S... | [
"static",
"public",
"Enumeration",
"<",
"CommPortIdentifier",
">",
"getPortIdentifiers",
"(",
")",
"{",
"LOGGER",
".",
"fine",
"(",
"\"static CommPortIdentifier:getPortIdentifiers()\"",
")",
";",
"//Do not allow anybody get any ports while we are re-initializing",
"//because the ... | Returns an enumeration of port identifiers which represent the
communication ports currently available on the system.
@return enumeration of available communication ports | [
"Returns",
"an",
"enumeration",
"of",
"port",
"identifiers",
"which",
"represent",
"the",
"communication",
"ports",
"currently",
"available",
"on",
"the",
"system",
"."
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/CommPortIdentifier.java#L339-L389 |
6,778 | bartprokop/rxtx | src/main/java/gnu/io/CommPortIdentifier.java | CommPortIdentifier.open | public CommPort open(String TheOwner, int i) throws gnu.io.PortInUseException {
LOGGER.fine("CommPortIdentifier:open(" + TheOwner + ", " + i + ")");
boolean isAvailable;
synchronized (this) {
isAvailable = this.Available;
if (isAvailable) {
//assume owne... | java | public CommPort open(String TheOwner, int i) throws gnu.io.PortInUseException {
LOGGER.fine("CommPortIdentifier:open(" + TheOwner + ", " + i + ")");
boolean isAvailable;
synchronized (this) {
isAvailable = this.Available;
if (isAvailable) {
//assume owne... | [
"public",
"CommPort",
"open",
"(",
"String",
"TheOwner",
",",
"int",
"i",
")",
"throws",
"gnu",
".",
"io",
".",
"PortInUseException",
"{",
"LOGGER",
".",
"fine",
"(",
"\"CommPortIdentifier:open(\"",
"+",
"TheOwner",
"+",
"\", \"",
"+",
"i",
"+",
"\")\"",
"... | not written in java? I can't see where this request is done. | [
"not",
"written",
"in",
"java?",
"I",
"can",
"t",
"see",
"where",
"this",
"request",
"is",
"done",
"."
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/CommPortIdentifier.java#L457-L521 |
6,779 | bartprokop/rxtx | src/main/java/gnu/io/CommPortIdentifier.java | CommPortIdentifier.removePortOwnershipListener | public void removePortOwnershipListener(CommPortOwnershipListener c) {
LOGGER.fine("CommPortIdentifier:removePortOwnershipListener()");
/* why is this called twice? */
if (ownershipListener != null) {
ownershipListener.removeElement(c);
}
} | java | public void removePortOwnershipListener(CommPortOwnershipListener c) {
LOGGER.fine("CommPortIdentifier:removePortOwnershipListener()");
/* why is this called twice? */
if (ownershipListener != null) {
ownershipListener.removeElement(c);
}
} | [
"public",
"void",
"removePortOwnershipListener",
"(",
"CommPortOwnershipListener",
"c",
")",
"{",
"LOGGER",
".",
"fine",
"(",
"\"CommPortIdentifier:removePortOwnershipListener()\"",
")",
";",
"/* why is this called twice? */",
"if",
"(",
"ownershipListener",
"!=",
"null",
"... | removes PortOwnership listener
@param c - listener to remove | [
"removes",
"PortOwnership",
"listener"
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/CommPortIdentifier.java#L528-L534 |
6,780 | bartprokop/rxtx | src/main/java/gnu/io/CommPortIdentifier.java | CommPortIdentifier.internalClosePort | void internalClosePort() {
synchronized (this) {
LOGGER.fine("CommPortIdentifier:internalClosePort()");
Owner = null;
Available = true;
// TODO (by Alexander Graf) to set the commPort to null is
// incompatible with the idea behind the architecture of ... | java | void internalClosePort() {
synchronized (this) {
LOGGER.fine("CommPortIdentifier:internalClosePort()");
Owner = null;
Available = true;
// TODO (by Alexander Graf) to set the commPort to null is
// incompatible with the idea behind the architecture of ... | [
"void",
"internalClosePort",
"(",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"LOGGER",
".",
"fine",
"(",
"\"CommPortIdentifier:internalClosePort()\"",
")",
";",
"Owner",
"=",
"null",
";",
"Available",
"=",
"true",
";",
"// TODO (by Alexander Graf) to set the c... | clean up the Ownership information and send the event | [
"clean",
"up",
"the",
"Ownership",
"information",
"and",
"send",
"the",
"event"
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/CommPortIdentifier.java#L539-L553 |
6,781 | bartprokop/rxtx | src/main/java/gnu/io/RXTXPort.java | RXTXPort.removeEventListener | public void removeEventListener() {
logger.fine("RXTXPort:removeEventListener() called");
waitForTheNativeCodeSilly();
//if( monThread != null && monThread.isAlive() )
if (monThreadisInterrupted == true) {
logger.fine(" RXTXPort:removeEventListener() already interrupted");
... | java | public void removeEventListener() {
logger.fine("RXTXPort:removeEventListener() called");
waitForTheNativeCodeSilly();
//if( monThread != null && monThread.isAlive() )
if (monThreadisInterrupted == true) {
logger.fine(" RXTXPort:removeEventListener() already interrupted");
... | [
"public",
"void",
"removeEventListener",
"(",
")",
"{",
"logger",
".",
"fine",
"(",
"\"RXTXPort:removeEventListener() called\"",
")",
";",
"waitForTheNativeCodeSilly",
"(",
")",
";",
"//if( monThread != null && monThread.isAlive() )",
"if",
"(",
"monThreadisInterrupted",
"=... | Remove the serial port event listener | [
"Remove",
"the",
"serial",
"port",
"event",
"listener"
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/gnu/io/RXTXPort.java#L829-L876 |
6,782 | bartprokop/rxtx | src/main/java/name/prokop/bart/rxtx/Demo1.java | Demo1.getSerialPortList | public static String[] getSerialPortList() {
Enumeration portList;
portList = CommPortIdentifier.getPortIdentifiers();
int serialPortCount = 0;
while (portList.hasMoreElements()) {
CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement();
if... | java | public static String[] getSerialPortList() {
Enumeration portList;
portList = CommPortIdentifier.getPortIdentifiers();
int serialPortCount = 0;
while (portList.hasMoreElements()) {
CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement();
if... | [
"public",
"static",
"String",
"[",
"]",
"getSerialPortList",
"(",
")",
"{",
"Enumeration",
"portList",
";",
"portList",
"=",
"CommPortIdentifier",
".",
"getPortIdentifiers",
"(",
")",
";",
"int",
"serialPortCount",
"=",
"0",
";",
"while",
"(",
"portList",
".",... | Zwraca liste portow szeregowych
@return Zwraca liste portow szeregowych. Zwracana jest tablica string�w.
Stringi te mo�na u�y� w funkcji getSerialPort | [
"Zwraca",
"liste",
"portow",
"szeregowych"
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/name/prokop/bart/rxtx/Demo1.java#L83-L107 |
6,783 | bartprokop/rxtx | src/main/java/name/prokop/bart/rxtx/Demo1.java | Demo1.getParallelPortList | public static String[] getParallelPortList() {
Enumeration portList;
portList = CommPortIdentifier.getPortIdentifiers();
int serialPortCount = 0;
while (portList.hasMoreElements()) {
CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement();
... | java | public static String[] getParallelPortList() {
Enumeration portList;
portList = CommPortIdentifier.getPortIdentifiers();
int serialPortCount = 0;
while (portList.hasMoreElements()) {
CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement();
... | [
"public",
"static",
"String",
"[",
"]",
"getParallelPortList",
"(",
")",
"{",
"Enumeration",
"portList",
";",
"portList",
"=",
"CommPortIdentifier",
".",
"getPortIdentifiers",
"(",
")",
";",
"int",
"serialPortCount",
"=",
"0",
";",
"while",
"(",
"portList",
".... | Zwraca liste portow rownoleglych
@return Zwraca liste portow rownoleglych | [
"Zwraca",
"liste",
"portow",
"rownoleglych"
] | 7b2c7857c262743e9dd15e9779c880b93c650890 | https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/name/prokop/bart/rxtx/Demo1.java#L114-L138 |
6,784 | motown-io/motown | ocpi/ocpi-identification-authorization-plugin/src/main/java/io/motown/ocpi/persistence/repository/OcpiRepository.java | OcpiRepository.getTokenSyncDate | public TokenSyncDate getTokenSyncDate(Integer subscriptionId) {
EntityManager entityManager = getEntityManager();
try {
List<TokenSyncDate> list = entityManager
.createQuery("SELECT syncDate FROM TokenSyncDate AS syncDate WHERE subscriptionId = :subscriptionId", TokenSyncDate.class).setMaxResult... | java | public TokenSyncDate getTokenSyncDate(Integer subscriptionId) {
EntityManager entityManager = getEntityManager();
try {
List<TokenSyncDate> list = entityManager
.createQuery("SELECT syncDate FROM TokenSyncDate AS syncDate WHERE subscriptionId = :subscriptionId", TokenSyncDate.class).setMaxResult... | [
"public",
"TokenSyncDate",
"getTokenSyncDate",
"(",
"Integer",
"subscriptionId",
")",
"{",
"EntityManager",
"entityManager",
"=",
"getEntityManager",
"(",
")",
";",
"try",
"{",
"List",
"<",
"TokenSyncDate",
">",
"list",
"=",
"entityManager",
".",
"createQuery",
"(... | get the date the tokens where last synced for the subscriptionId passed as argument
getTokenSyncDate
@param subscriptionId
@return | [
"get",
"the",
"date",
"the",
"tokens",
"where",
"last",
"synced",
"for",
"the",
"subscriptionId",
"passed",
"as",
"argument"
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/ocpi/ocpi-identification-authorization-plugin/src/main/java/io/motown/ocpi/persistence/repository/OcpiRepository.java#L165-L180 |
6,785 | motown-io/motown | ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/OcppJsonService.java | OcppJsonService.changeConfiguration | public void changeConfiguration(ChargingStationId chargingStationId, ConfigurationItem configurationItem, CorrelationToken correlationToken) {
Changeconfiguration changeConfigurationRequest = new Changeconfiguration();
changeConfigurationRequest.setKey(configurationItem.getKey());
changeConfigur... | java | public void changeConfiguration(ChargingStationId chargingStationId, ConfigurationItem configurationItem, CorrelationToken correlationToken) {
Changeconfiguration changeConfigurationRequest = new Changeconfiguration();
changeConfigurationRequest.setKey(configurationItem.getKey());
changeConfigur... | [
"public",
"void",
"changeConfiguration",
"(",
"ChargingStationId",
"chargingStationId",
",",
"ConfigurationItem",
"configurationItem",
",",
"CorrelationToken",
"correlationToken",
")",
"{",
"Changeconfiguration",
"changeConfigurationRequest",
"=",
"new",
"Changeconfiguration",
... | Send a request to a charging station to change a configuration item.
@param chargingStationId the charging station's id.
@param configurationItem the configuration item to change.
@param correlationToken the token to correlate commands and events that belong together. | [
"Send",
"a",
"request",
"to",
"a",
"charging",
"station",
"to",
"change",
"a",
"configuration",
"item",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/OcppJsonService.java#L111-L120 |
6,786 | motown-io/motown | ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/OcppJsonService.java | OcppJsonService.convertAuthenticationStatus | private IdTagInfo_.Status convertAuthenticationStatus(IdentifyingToken.AuthenticationStatus status) {
IdTagInfo_.Status result;
switch (status) {
case ACCEPTED:
result = IdTagInfo_.Status.ACCEPTED;
break;
case EXPIRED:
result = IdTa... | java | private IdTagInfo_.Status convertAuthenticationStatus(IdentifyingToken.AuthenticationStatus status) {
IdTagInfo_.Status result;
switch (status) {
case ACCEPTED:
result = IdTagInfo_.Status.ACCEPTED;
break;
case EXPIRED:
result = IdTa... | [
"private",
"IdTagInfo_",
".",
"Status",
"convertAuthenticationStatus",
"(",
"IdentifyingToken",
".",
"AuthenticationStatus",
"status",
")",
"{",
"IdTagInfo_",
".",
"Status",
"result",
";",
"switch",
"(",
"status",
")",
"{",
"case",
"ACCEPTED",
":",
"result",
"=",
... | Converts the AuthenticationStatus into an OCPPJ specific status
@param status the authentication status.
@return the OCPP/J status. | [
"Converts",
"the",
"AuthenticationStatus",
"into",
"an",
"OCPPJ",
"specific",
"status"
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/OcppJsonService.java#L241-L264 |
6,787 | motown-io/motown | vas/v10-soap/src/main/java/io/motown/vas/v10/soap/VasConversionService.java | VasConversionService.getVasRepresentation | public ChargePoint getVasRepresentation(ChargingStation chargingStation) {
ChargePoint chargePoint = new ChargePoint();
chargePoint.setAddress(chargingStation.getAddress());
chargePoint.getChargingCapabilities().addAll(getChargingCapabilities(chargingStation));
chargePoint.setChargingMod... | java | public ChargePoint getVasRepresentation(ChargingStation chargingStation) {
ChargePoint chargePoint = new ChargePoint();
chargePoint.setAddress(chargingStation.getAddress());
chargePoint.getChargingCapabilities().addAll(getChargingCapabilities(chargingStation));
chargePoint.setChargingMod... | [
"public",
"ChargePoint",
"getVasRepresentation",
"(",
"ChargingStation",
"chargingStation",
")",
"{",
"ChargePoint",
"chargePoint",
"=",
"new",
"ChargePoint",
"(",
")",
";",
"chargePoint",
".",
"setAddress",
"(",
"chargingStation",
".",
"getAddress",
"(",
")",
")",
... | Creates a VAS representation of a charging station.
@param chargingStation charging station.
@return VAS representation of the charging station. | [
"Creates",
"a",
"VAS",
"representation",
"of",
"a",
"charging",
"station",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/vas/v10-soap/src/main/java/io/motown/vas/v10/soap/VasConversionService.java#L40-L62 |
6,788 | motown-io/motown | vas/view-model/src/main/java/io/motown/vas/viewmodel/VasEventHandler.java | VasEventHandler.updateReservableForChargingStation | private void updateReservableForChargingStation(ChargingStationId chargingStationId, boolean reservable) {
ChargingStation chargingStation = getChargingStation(chargingStationId);
if (chargingStation != null) {
chargingStation.setReservable(reservable);
chargingStationRepository... | java | private void updateReservableForChargingStation(ChargingStationId chargingStationId, boolean reservable) {
ChargingStation chargingStation = getChargingStation(chargingStationId);
if (chargingStation != null) {
chargingStation.setReservable(reservable);
chargingStationRepository... | [
"private",
"void",
"updateReservableForChargingStation",
"(",
"ChargingStationId",
"chargingStationId",
",",
"boolean",
"reservable",
")",
"{",
"ChargingStation",
"chargingStation",
"=",
"getChargingStation",
"(",
"chargingStationId",
")",
";",
"if",
"(",
"chargingStation",... | Updates the 'reservable' property of the charging station. If the charging station cannot be found in the
repository an error is logged.
@param chargingStationId charging station identifier.
@param reservable true if the charging station is reservable, false otherwise. | [
"Updates",
"the",
"reservable",
"property",
"of",
"the",
"charging",
"station",
".",
"If",
"the",
"charging",
"station",
"cannot",
"be",
"found",
"in",
"the",
"repository",
"an",
"error",
"is",
"logged",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/vas/view-model/src/main/java/io/motown/vas/viewmodel/VasEventHandler.java#L251-L258 |
6,789 | motown-io/motown | ocpp/v15-soap/src/main/java/io/motown/ocpp/v15/soap/chargepoint/ChargingStationOcpp15SoapClient.java | ChargingStationOcpp15SoapClient.reset | private boolean reset(ChargingStationId id, ResetType type) {
ChargePointService chargePointService = this.createChargingStationService(id);
ResetRequest request = new ResetRequest();
request.setType(type);
ResetResponse response = chargePointService.reset(request, id.getId());
... | java | private boolean reset(ChargingStationId id, ResetType type) {
ChargePointService chargePointService = this.createChargingStationService(id);
ResetRequest request = new ResetRequest();
request.setType(type);
ResetResponse response = chargePointService.reset(request, id.getId());
... | [
"private",
"boolean",
"reset",
"(",
"ChargingStationId",
"id",
",",
"ResetType",
"type",
")",
"{",
"ChargePointService",
"chargePointService",
"=",
"this",
".",
"createChargingStationService",
"(",
"id",
")",
";",
"ResetRequest",
"request",
"=",
"new",
"ResetRequest... | Reset a charging station.
@param id the charging station's id.
@param type the type of reset (i.e. soft or hard).
@return true if the charging station has reset, false if it hasn't. | [
"Reset",
"a",
"charging",
"station",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/ocpp/v15-soap/src/main/java/io/motown/ocpp/v15/soap/chargepoint/ChargingStationOcpp15SoapClient.java#L408-L432 |
6,790 | motown-io/motown | operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java | ChargingStationEventListener.updateEvseStatus | private void updateEvseStatus(ChargingStation chargingStation, String componentId, ComponentStatus status) {
for (Evse evse : chargingStation.getEvses()) {
if (evse.getEvseId().equals(componentId)) {
evse.setStatus(status);
}
}
} | java | private void updateEvseStatus(ChargingStation chargingStation, String componentId, ComponentStatus status) {
for (Evse evse : chargingStation.getEvses()) {
if (evse.getEvseId().equals(componentId)) {
evse.setStatus(status);
}
}
} | [
"private",
"void",
"updateEvseStatus",
"(",
"ChargingStation",
"chargingStation",
",",
"String",
"componentId",
",",
"ComponentStatus",
"status",
")",
"{",
"for",
"(",
"Evse",
"evse",
":",
"chargingStation",
".",
"getEvses",
"(",
")",
")",
"{",
"if",
"(",
"evs... | Updates the status of a Evse in the charging station object if the evse id matches the component id.
@param chargingStation charging stationidentifier.
@param componentId component identifier.
@param status new status. | [
"Updates",
"the",
"status",
"of",
"a",
"Evse",
"in",
"the",
"charging",
"station",
"object",
"if",
"the",
"evse",
"id",
"matches",
"the",
"component",
"id",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java#L352-L358 |
6,791 | motown-io/motown | operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java | ChargingStationEventListener.updateChargingStationAvailability | private void updateChargingStationAvailability(ChargingStationId chargingStationId, Availability availability) {
ChargingStation chargingStation = repository.findOne(chargingStationId.getId());
if (chargingStation != null) {
chargingStation.setAvailability(availability);
reposit... | java | private void updateChargingStationAvailability(ChargingStationId chargingStationId, Availability availability) {
ChargingStation chargingStation = repository.findOne(chargingStationId.getId());
if (chargingStation != null) {
chargingStation.setAvailability(availability);
reposit... | [
"private",
"void",
"updateChargingStationAvailability",
"(",
"ChargingStationId",
"chargingStationId",
",",
"Availability",
"availability",
")",
"{",
"ChargingStation",
"chargingStation",
"=",
"repository",
".",
"findOne",
"(",
"chargingStationId",
".",
"getId",
"(",
")",... | Updates the charging station's availability.
@param chargingStationId the charging station's id.
@param availability the charging station's new availability. | [
"Updates",
"the",
"charging",
"station",
"s",
"availability",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java#L366-L373 |
6,792 | motown-io/motown | operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java | ChargingStationEventListener.updateComponentAvailability | private void updateComponentAvailability(ChargingStationId chargingStationId, ComponentId componentId, ChargingStationComponent component, Availability availability) {
if (!component.equals(ChargingStationComponent.EVSE) || !(componentId instanceof EvseId)) {
return;
}
ChargingStati... | java | private void updateComponentAvailability(ChargingStationId chargingStationId, ComponentId componentId, ChargingStationComponent component, Availability availability) {
if (!component.equals(ChargingStationComponent.EVSE) || !(componentId instanceof EvseId)) {
return;
}
ChargingStati... | [
"private",
"void",
"updateComponentAvailability",
"(",
"ChargingStationId",
"chargingStationId",
",",
"ComponentId",
"componentId",
",",
"ChargingStationComponent",
"component",
",",
"Availability",
"availability",
")",
"{",
"if",
"(",
"!",
"component",
".",
"equals",
"... | Updates a charging station's component availability.
@param chargingStationId the charging station's id.
@param componentId the component's id.
@param component the component type.
@param availability the the charging station's new availability. | [
"Updates",
"a",
"charging",
"station",
"s",
"component",
"availability",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java#L383-L399 |
6,793 | motown-io/motown | operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java | ChargingStationEventListener.updateChargingStationOpeningTimes | private boolean updateChargingStationOpeningTimes(ChargingStationOpeningTimesChangedEvent event, boolean clear) {
ChargingStation chargingStation = repository.findOne(event.getChargingStationId().getId());
if (chargingStation != null) {
if (!event.getOpeningTimes().isEmpty()) {
... | java | private boolean updateChargingStationOpeningTimes(ChargingStationOpeningTimesChangedEvent event, boolean clear) {
ChargingStation chargingStation = repository.findOne(event.getChargingStationId().getId());
if (chargingStation != null) {
if (!event.getOpeningTimes().isEmpty()) {
... | [
"private",
"boolean",
"updateChargingStationOpeningTimes",
"(",
"ChargingStationOpeningTimesChangedEvent",
"event",
",",
"boolean",
"clear",
")",
"{",
"ChargingStation",
"chargingStation",
"=",
"repository",
".",
"findOne",
"(",
"event",
".",
"getChargingStationId",
"(",
... | Updates the opening times of the charging station.
@param event The event which contains the opening times.
@param clear Whether to clear the opening times or not.
@return {@code true} if the update has been performed, {@code false} if the charging station can't be found. | [
"Updates",
"the",
"opening",
"times",
"of",
"the",
"charging",
"station",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java#L408-L434 |
6,794 | motown-io/motown | operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java | ChargingStationEventListener.updateChargingStationLocation | private boolean updateChargingStationLocation(ChargingStationLocationChangedEvent event) {
ChargingStation chargingStation = repository.findOne(event.getChargingStationId().getId());
if (chargingStation != null) {
if (event.getCoordinates() != null) {
chargingStation.setLati... | java | private boolean updateChargingStationLocation(ChargingStationLocationChangedEvent event) {
ChargingStation chargingStation = repository.findOne(event.getChargingStationId().getId());
if (chargingStation != null) {
if (event.getCoordinates() != null) {
chargingStation.setLati... | [
"private",
"boolean",
"updateChargingStationLocation",
"(",
"ChargingStationLocationChangedEvent",
"event",
")",
"{",
"ChargingStation",
"chargingStation",
"=",
"repository",
".",
"findOne",
"(",
"event",
".",
"getChargingStationId",
"(",
")",
".",
"getId",
"(",
")",
... | Updates the location of the charging station.
@param event The event which contains the data of the location.
@return {@code true} if the update has been performed, {@code false} if the charging station can't be found. | [
"Updates",
"the",
"location",
"of",
"the",
"charging",
"station",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java#L442-L468 |
6,795 | motown-io/motown | operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java | ChargingStationEventListener.setReservable | private void setReservable(ChargingStationId chargingStationId, boolean reservable) {
ChargingStation chargingStation = repository.findOne(chargingStationId.getId());
if (chargingStation != null) {
chargingStation.setReservable(reservable);
repository.createOrUpdate(chargingStat... | java | private void setReservable(ChargingStationId chargingStationId, boolean reservable) {
ChargingStation chargingStation = repository.findOne(chargingStationId.getId());
if (chargingStation != null) {
chargingStation.setReservable(reservable);
repository.createOrUpdate(chargingStat... | [
"private",
"void",
"setReservable",
"(",
"ChargingStationId",
"chargingStationId",
",",
"boolean",
"reservable",
")",
"{",
"ChargingStation",
"chargingStation",
"=",
"repository",
".",
"findOne",
"(",
"chargingStationId",
".",
"getId",
"(",
")",
")",
";",
"if",
"(... | Makes a charging station reservable or not reservable.
@param chargingStationId the charging station to make reservable or not reservable.
@param reservable true if reservable, false if not. | [
"Makes",
"a",
"charging",
"station",
"reservable",
"or",
"not",
"reservable",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/operator-api/view-model/src/main/java/io/motown/operatorapi/viewmodel/ChargingStationEventListener.java#L476-L483 |
6,796 | motown-io/motown | domain/command-authorization/src/main/java/io/motown/domain/commandauthorization/CommandAuthorizationService.java | CommandAuthorizationService.isAuthorized | public boolean isAuthorized(ChargingStationId chargingStationId, UserIdentity userIdentity, Class commandClass) {
// first search for this specific authorization
boolean isAuthorized = commandAuthorizationRepository.find(chargingStationId.getId(), userIdentity.getId(), commandClass) != null;
if... | java | public boolean isAuthorized(ChargingStationId chargingStationId, UserIdentity userIdentity, Class commandClass) {
// first search for this specific authorization
boolean isAuthorized = commandAuthorizationRepository.find(chargingStationId.getId(), userIdentity.getId(), commandClass) != null;
if... | [
"public",
"boolean",
"isAuthorized",
"(",
"ChargingStationId",
"chargingStationId",
",",
"UserIdentity",
"userIdentity",
",",
"Class",
"commandClass",
")",
"{",
"// first search for this specific authorization",
"boolean",
"isAuthorized",
"=",
"commandAuthorizationRepository",
... | Checks if a user identity has access to a command class for a certain charging station.
@param chargingStationId charging station identification.
@param userIdentity user identity.
@param commandClass command class.
@return true if the user is authorized to execute the command for the charging stati... | [
"Checks",
"if",
"a",
"user",
"identity",
"has",
"access",
"to",
"a",
"command",
"class",
"for",
"a",
"certain",
"charging",
"station",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/domain/command-authorization/src/main/java/io/motown/domain/commandauthorization/CommandAuthorizationService.java#L35-L45 |
6,797 | motown-io/motown | utils/soap/src/main/java/io/motown/utils/soap/interceptor/MessageIdHeaderInterceptor.java | MessageIdHeaderInterceptor.messageIdHeaderExists | private Boolean messageIdHeaderExists(List<SoapHeader> headers) {
for(SoapHeader header:headers) {
if(header.getName().getLocalPart().equalsIgnoreCase(LOCAL_NAME)) {
return true;
}
}
return false;
} | java | private Boolean messageIdHeaderExists(List<SoapHeader> headers) {
for(SoapHeader header:headers) {
if(header.getName().getLocalPart().equalsIgnoreCase(LOCAL_NAME)) {
return true;
}
}
return false;
} | [
"private",
"Boolean",
"messageIdHeaderExists",
"(",
"List",
"<",
"SoapHeader",
">",
"headers",
")",
"{",
"for",
"(",
"SoapHeader",
"header",
":",
"headers",
")",
"{",
"if",
"(",
"header",
".",
"getName",
"(",
")",
".",
"getLocalPart",
"(",
")",
".",
"equ... | Checks if the MessageID header exists in the list of headers.
@param headers list of headers
@return true if the MessageID header exists, false if not | [
"Checks",
"if",
"the",
"MessageID",
"header",
"exists",
"in",
"the",
"list",
"of",
"headers",
"."
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/utils/soap/src/main/java/io/motown/utils/soap/interceptor/MessageIdHeaderInterceptor.java#L72-L79 |
6,798 | motown-io/motown | ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/wamp/WampMessageParser.java | WampMessageParser.parseMessage | public WampMessage parseMessage(ChargingStationId chargingStationId, Reader reader) throws IOException {
String rawMessage = this.convertToString(reader);
String trimmedMessage = this.removeBrackets(rawMessage);
//In case a payload is present, it always is the last part of the message
i... | java | public WampMessage parseMessage(ChargingStationId chargingStationId, Reader reader) throws IOException {
String rawMessage = this.convertToString(reader);
String trimmedMessage = this.removeBrackets(rawMessage);
//In case a payload is present, it always is the last part of the message
i... | [
"public",
"WampMessage",
"parseMessage",
"(",
"ChargingStationId",
"chargingStationId",
",",
"Reader",
"reader",
")",
"throws",
"IOException",
"{",
"String",
"rawMessage",
"=",
"this",
".",
"convertToString",
"(",
"reader",
")",
";",
"String",
"trimmedMessage",
"=",... | Parses a CALL, RESULT, or ERROR message and constructs a WampMessage
@param chargingStationId sending the message
@param reader containing the message
@return WampMessage
@throws IOException in case the message could not be read
@throws IllegalArgumentException in case an unknown wamp messageType is encountered | [
"Parses",
"a",
"CALL",
"RESULT",
"or",
"ERROR",
"message",
"and",
"constructs",
"a",
"WampMessage"
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/wamp/WampMessageParser.java#L42-L86 |
6,799 | motown-io/motown | ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/wamp/WampMessageParser.java | WampMessageParser.convertToString | private String convertToString(Reader reader) throws IOException {
StringBuilder stringBuilder = new StringBuilder();
int numChars;
char[] chars = new char[50];
do {
numChars = reader.read(chars, 0, chars.length);
if (numChars > 0) {
stringBuilder.... | java | private String convertToString(Reader reader) throws IOException {
StringBuilder stringBuilder = new StringBuilder();
int numChars;
char[] chars = new char[50];
do {
numChars = reader.read(chars, 0, chars.length);
if (numChars > 0) {
stringBuilder.... | [
"private",
"String",
"convertToString",
"(",
"Reader",
"reader",
")",
"throws",
"IOException",
"{",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"numChars",
";",
"char",
"[",
"]",
"chars",
"=",
"new",
"char",
"[",
"50"... | Constructs a String by reading the characters from the Reader
@param reader Reader to read from
@return String containing the message
@throws IOException in case of read failure | [
"Constructs",
"a",
"String",
"by",
"reading",
"the",
"characters",
"from",
"the",
"Reader"
] | 783ccda7c28b273a529ddd47defe8673b1ea365b | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/ocpp/websocket-json/src/main/java/io/motown/ocpp/websocketjson/wamp/WampMessageParser.java#L94-L106 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.