repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
opsgenie/opsgenieclient | sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java | AlertApi.deleteAttachment | public SuccessResponse deleteAttachment(DeleteAlertAttachmentRequest params) throws ApiException {
String identifier = params.getIdentifier();
Long attachmentId = params.getAttachmentId();
String alertIdentifierType = params.getAlertIdentifierType().getValue();
String user = params.getUser();
Obje... | java | public SuccessResponse deleteAttachment(DeleteAlertAttachmentRequest params) throws ApiException {
String identifier = params.getIdentifier();
Long attachmentId = params.getAttachmentId();
String alertIdentifierType = params.getAlertIdentifierType().getValue();
String user = params.getUser();
Obje... | [
"public",
"SuccessResponse",
"deleteAttachment",
"(",
"DeleteAlertAttachmentRequest",
"params",
")",
"throws",
"ApiException",
"{",
"String",
"identifier",
"=",
"params",
".",
"getIdentifier",
"(",
")",
";",
"Long",
"attachmentId",
"=",
"params",
".",
"getAttachmentId... | Delete Alert Attachment
Delete alert attachment for the given identifier
@param params.identifier Identifier of alert which could be alert id, tiny id or alert alias (required)
@param params.attachmentId Identifier of alert attachment (required)
@param params.alertIdentifierType Type of the identifier ... | [
"Delete",
"Alert",
"Attachment",
"Delete",
"alert",
"attachment",
"for",
"the",
"given",
"identifier"
] | 6d94efb16bbc74be189c86e9329af510ac8a048c | https://github.com/opsgenie/opsgenieclient/blob/6d94efb16bbc74be189c86e9329af510ac8a048c/sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java#L570-L618 | train |
opsgenie/opsgenieclient | sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java | AlertApi.listAlerts | public ListAlertsResponse listAlerts(ListAlertsRequest params) throws ApiException {
Integer limit = params.getLimit();
String sort = params.getSort().getValue();
Integer offset = params.getOffset();
String order = params.getOrder().getValue();
String query = params.getQuery();
String searchIden... | java | public ListAlertsResponse listAlerts(ListAlertsRequest params) throws ApiException {
Integer limit = params.getLimit();
String sort = params.getSort().getValue();
Integer offset = params.getOffset();
String order = params.getOrder().getValue();
String query = params.getQuery();
String searchIden... | [
"public",
"ListAlertsResponse",
"listAlerts",
"(",
"ListAlertsRequest",
"params",
")",
"throws",
"ApiException",
"{",
"Integer",
"limit",
"=",
"params",
".",
"getLimit",
"(",
")",
";",
"String",
"sort",
"=",
"params",
".",
"getSort",
"(",
")",
".",
"getValue",... | List Alerts
Returns list of alerts
@param params.limit Maximum number of items to provide in the result. Must be a positive integer value. Default value is 20 and maximum value is 100 (optional)
@param params.sort Name of the field that result set will be sorted by (optional, default to ... | [
"List",
"Alerts",
"Returns",
"list",
"of",
"alerts"
] | 6d94efb16bbc74be189c86e9329af510ac8a048c | https://github.com/opsgenie/opsgenieclient/blob/6d94efb16bbc74be189c86e9329af510ac8a048c/sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java#L1122-L1166 | train |
opsgenie/opsgenieclient | sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java | AlertApi.listNotes | public ListAlertNotesResponse listNotes(ListAlertNotesRequest params) throws ApiException {
String identifier = params.getIdentifier();
String identifierType = params.getIdentifierType().getValue();
String offset = params.getOffset();
String direction = params.getDirection().getValue();
Integer limi... | java | public ListAlertNotesResponse listNotes(ListAlertNotesRequest params) throws ApiException {
String identifier = params.getIdentifier();
String identifierType = params.getIdentifierType().getValue();
String offset = params.getOffset();
String direction = params.getDirection().getValue();
Integer limi... | [
"public",
"ListAlertNotesResponse",
"listNotes",
"(",
"ListAlertNotesRequest",
"params",
")",
"throws",
"ApiException",
"{",
"String",
"identifier",
"=",
"params",
".",
"getIdentifier",
"(",
")",
";",
"String",
"identifierType",
"=",
"params",
".",
"getIdentifierType"... | List Alert Notes
List alert notes for the given alert identifier
@param params.identifier Identifier of alert which could be alert id, tiny id or alert alias (required)
@param params.identifierType Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or ... | [
"List",
"Alert",
"Notes",
"List",
"alert",
"notes",
"for",
"the",
"given",
"alert",
"identifier"
] | 6d94efb16bbc74be189c86e9329af510ac8a048c | https://github.com/opsgenie/opsgenieclient/blob/6d94efb16bbc74be189c86e9329af510ac8a048c/sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java#L1291-L1338 | train |
opsgenie/opsgenieclient | sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java | AlertApi.listSavedSearches | public ListSavedSearchResponse listSavedSearches() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/alerts/saved-searches";
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHea... | java | public ListSavedSearchResponse listSavedSearches() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v2/alerts/saved-searches";
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHea... | [
"public",
"ListSavedSearchResponse",
"listSavedSearches",
"(",
")",
"throws",
"ApiException",
"{",
"Object",
"localVarPostBody",
"=",
"null",
";",
"// create path and map variables",
"String",
"localVarPath",
"=",
"\"/v2/alerts/saved-searches\"",
";",
"// query params",
"List... | Lists Saved Searches
List all saved searches
@return ListSavedSearchResponse
@throws ApiException if fails to make API call | [
"Lists",
"Saved",
"Searches",
"List",
"all",
"saved",
"searches"
] | 6d94efb16bbc74be189c86e9329af510ac8a048c | https://github.com/opsgenie/opsgenieclient/blob/6d94efb16bbc74be189c86e9329af510ac8a048c/sdk-swagger/src/main/java/com/ifountain/opsgenie/client/swagger/api/AlertApi.java#L1395-L1424 | train |
opsgenie/opsgenieclient | sdk/src/main/java/com/ifountain/opsgenie/client/model/schedule/UpdateScheduleRequest.java | UpdateScheduleRequest.getRotations | public List<ScheduleRotation> getRotations() {
if (getTimeZone() != null && rotations != null)
for (ScheduleRotation scheduleRotation : rotations)
scheduleRotation.setScheduleTimeZone(getTimeZone());
return rotations;
} | java | public List<ScheduleRotation> getRotations() {
if (getTimeZone() != null && rotations != null)
for (ScheduleRotation scheduleRotation : rotations)
scheduleRotation.setScheduleTimeZone(getTimeZone());
return rotations;
} | [
"public",
"List",
"<",
"ScheduleRotation",
">",
"getRotations",
"(",
")",
"{",
"if",
"(",
"getTimeZone",
"(",
")",
"!=",
"null",
"&&",
"rotations",
"!=",
"null",
")",
"for",
"(",
"ScheduleRotation",
"scheduleRotation",
":",
"rotations",
")",
"scheduleRotation"... | Rotations of schedule | [
"Rotations",
"of",
"schedule"
] | 6d94efb16bbc74be189c86e9329af510ac8a048c | https://github.com/opsgenie/opsgenieclient/blob/6d94efb16bbc74be189c86e9329af510ac8a048c/sdk/src/main/java/com/ifountain/opsgenie/client/model/schedule/UpdateScheduleRequest.java#L60-L65 | train |
opsgenie/opsgenieclient | sdk/src/main/java/com/ifountain/opsgenie/client/model/beans/ScheduleRotation.java | ScheduleRotation.getParticipantsNames | @JsonProperty("participants")
public List<String> getParticipantsNames() {
if (participants == null)
return null;
List<String> participantList = new ArrayList<String>();
for (ScheduleParticipant participant : participants)
participantList.add(participant.getParticipan... | java | @JsonProperty("participants")
public List<String> getParticipantsNames() {
if (participants == null)
return null;
List<String> participantList = new ArrayList<String>();
for (ScheduleParticipant participant : participants)
participantList.add(participant.getParticipan... | [
"@",
"JsonProperty",
"(",
"\"participants\"",
")",
"public",
"List",
"<",
"String",
">",
"getParticipantsNames",
"(",
")",
"{",
"if",
"(",
"participants",
"==",
"null",
")",
"return",
"null",
";",
"List",
"<",
"String",
">",
"participantList",
"=",
"new",
... | Participants of schedule rotation
@see ScheduleParticipant | [
"Participants",
"of",
"schedule",
"rotation"
] | 6d94efb16bbc74be189c86e9329af510ac8a048c | https://github.com/opsgenie/opsgenieclient/blob/6d94efb16bbc74be189c86e9329af510ac8a048c/sdk/src/main/java/com/ifountain/opsgenie/client/model/beans/ScheduleRotation.java#L95-L103 | train |
spring-social/spring-social-google | src/main/java/org/springframework/social/google/connect/GoogleAdapter.java | GoogleAdapter.setConnectionValues | public void setConnectionValues(final Google google, final ConnectionValues values) {
final UserInfo userInfo = google.oauth2Operations().getUserinfo();
values.setProviderUserId(userInfo.getId());
values.setDisplayName(userInfo.getName());
values.setProfileUrl(userInfo.getLink());
values.setImageUrl... | java | public void setConnectionValues(final Google google, final ConnectionValues values) {
final UserInfo userInfo = google.oauth2Operations().getUserinfo();
values.setProviderUserId(userInfo.getId());
values.setDisplayName(userInfo.getName());
values.setProfileUrl(userInfo.getLink());
values.setImageUrl... | [
"public",
"void",
"setConnectionValues",
"(",
"final",
"Google",
"google",
",",
"final",
"ConnectionValues",
"values",
")",
"{",
"final",
"UserInfo",
"userInfo",
"=",
"google",
".",
"oauth2Operations",
"(",
")",
".",
"getUserinfo",
"(",
")",
";",
"values",
"."... | Set a value on the connection. | [
"Set",
"a",
"value",
"on",
"the",
"connection",
"."
] | 109d050ecefe390f3d0b675c18b70fb5fd2d68ca | https://github.com/spring-social/spring-social-google/blob/109d050ecefe390f3d0b675c18b70fb5fd2d68ca/src/main/java/org/springframework/social/google/connect/GoogleAdapter.java#L47-L53 | train |
spring-social/spring-social-google | src/main/java/org/springframework/social/google/connect/GoogleAdapter.java | GoogleAdapter.fetchUserProfile | public UserProfile fetchUserProfile(final Google google) {
final UserInfo userInfo = google.oauth2Operations().getUserinfo();
return new UserProfileBuilder().setUsername(userInfo.getId())
.setId(userInfo.getId())
.setEmail(userInfo.getEmail())
.setName(userInfo.getName())
.setFirstName(u... | java | public UserProfile fetchUserProfile(final Google google) {
final UserInfo userInfo = google.oauth2Operations().getUserinfo();
return new UserProfileBuilder().setUsername(userInfo.getId())
.setId(userInfo.getId())
.setEmail(userInfo.getEmail())
.setName(userInfo.getName())
.setFirstName(u... | [
"public",
"UserProfile",
"fetchUserProfile",
"(",
"final",
"Google",
"google",
")",
"{",
"final",
"UserInfo",
"userInfo",
"=",
"google",
".",
"oauth2Operations",
"(",
")",
".",
"getUserinfo",
"(",
")",
";",
"return",
"new",
"UserProfileBuilder",
"(",
")",
".",... | Return the current user profile. | [
"Return",
"the",
"current",
"user",
"profile",
"."
] | 109d050ecefe390f3d0b675c18b70fb5fd2d68ca | https://github.com/spring-social/spring-social-google/blob/109d050ecefe390f3d0b675c18b70fb5fd2d68ca/src/main/java/org/springframework/social/google/connect/GoogleAdapter.java#L58-L66 | train |
spring-social/spring-social-google | src/main/java/org/springframework/social/google/api/plus/Person.java | Person.getImageUrl | public String getImageUrl() {
if (thumbnailUrl != null) {
return thumbnailUrl;
}
if (image != null) {
return image.url;
}
return null;
} | java | public String getImageUrl() {
if (thumbnailUrl != null) {
return thumbnailUrl;
}
if (image != null) {
return image.url;
}
return null;
} | [
"public",
"String",
"getImageUrl",
"(",
")",
"{",
"if",
"(",
"thumbnailUrl",
"!=",
"null",
")",
"{",
"return",
"thumbnailUrl",
";",
"}",
"if",
"(",
"image",
"!=",
"null",
")",
"{",
"return",
"image",
".",
"url",
";",
"}",
"return",
"null",
";",
"}"
] | Get the image URL - uses the thumbnail if set, then the main image, otherwise returns null. | [
"Get",
"the",
"image",
"URL",
"-",
"uses",
"the",
"thumbnail",
"if",
"set",
"then",
"the",
"main",
"image",
"otherwise",
"returns",
"null",
"."
] | 109d050ecefe390f3d0b675c18b70fb5fd2d68ca | https://github.com/spring-social/spring-social-google/blob/109d050ecefe390f3d0b675c18b70fb5fd2d68ca/src/main/java/org/springframework/social/google/api/plus/Person.java#L99-L109 | train |
spring-social/spring-social-google | src/main/java/org/springframework/social/google/api/plus/Person.java | Person.getAccountEmail | public String getAccountEmail() {
if (emails != null) {
for (final Entry<String, String> entry : emails.entrySet()) {
if (entry.getValue().equals("account")) {
return entry.getKey();
}
}
}
return null;
} | java | public String getAccountEmail() {
if (emails != null) {
for (final Entry<String, String> entry : emails.entrySet()) {
if (entry.getValue().equals("account")) {
return entry.getKey();
}
}
}
return null;
} | [
"public",
"String",
"getAccountEmail",
"(",
")",
"{",
"if",
"(",
"emails",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
":",
"emails",
".",
"entrySet",
"(",
")",
")",
"{",
"if",
"(",
"entry",
"."... | Return the account email.
@return Null if no account email found, otherwise a single String. | [
"Return",
"the",
"account",
"email",
"."
] | 109d050ecefe390f3d0b675c18b70fb5fd2d68ca | https://github.com/spring-social/spring-social-google/blob/109d050ecefe390f3d0b675c18b70fb5fd2d68ca/src/main/java/org/springframework/social/google/api/plus/Person.java#L197-L206 | train |
spring-social/spring-social-google | src/main/java/org/springframework/social/google/api/impl/ApiEnumSerializer.java | ApiEnumSerializer.enumToString | public static String enumToString(final Enum<?> value) {
if (value == null) {
return null;
}
final String underscored = value.name();
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < underscored.length(); i++) {
final char c = underscored.charAt(i);
if (c == '_'... | java | public static String enumToString(final Enum<?> value) {
if (value == null) {
return null;
}
final String underscored = value.name();
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < underscored.length(); i++) {
final char c = underscored.charAt(i);
if (c == '_'... | [
"public",
"static",
"String",
"enumToString",
"(",
"final",
"Enum",
"<",
"?",
">",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"String",
"underscored",
"=",
"value",
".",
"name",
"(",
")",
";",
... | Convert an enumeration to a String representation. | [
"Convert",
"an",
"enumeration",
"to",
"a",
"String",
"representation",
"."
] | 109d050ecefe390f3d0b675c18b70fb5fd2d68ca | https://github.com/spring-social/spring-social-google/blob/109d050ecefe390f3d0b675c18b70fb5fd2d68ca/src/main/java/org/springframework/social/google/api/impl/ApiEnumSerializer.java#L34-L52 | train |
fabric8io/mockwebserver | src/main/java/io/fabric8/mockwebserver/crud/CrudDispatcher.java | CrudDispatcher.handleCreate | public MockResponse handleCreate(String path, String s) {
MockResponse response = new MockResponse();
AttributeSet features = AttributeSet.merge(attributeExtractor.fromPath(path), attributeExtractor.fromResource(s));
map.put(features, s);
response.setBody(s);
response.setResponse... | java | public MockResponse handleCreate(String path, String s) {
MockResponse response = new MockResponse();
AttributeSet features = AttributeSet.merge(attributeExtractor.fromPath(path), attributeExtractor.fromResource(s));
map.put(features, s);
response.setBody(s);
response.setResponse... | [
"public",
"MockResponse",
"handleCreate",
"(",
"String",
"path",
",",
"String",
"s",
")",
"{",
"MockResponse",
"response",
"=",
"new",
"MockResponse",
"(",
")",
";",
"AttributeSet",
"features",
"=",
"AttributeSet",
".",
"merge",
"(",
"attributeExtractor",
".",
... | Adds the specified object to the in-memory db.
@param path
@param s
@return | [
"Adds",
"the",
"specified",
"object",
"to",
"the",
"in",
"-",
"memory",
"db",
"."
] | ca14c6dd2ec8e2425585a548d5c0d993332b9d2f | https://github.com/fabric8io/mockwebserver/blob/ca14c6dd2ec8e2425585a548d5c0d993332b9d2f/src/main/java/io/fabric8/mockwebserver/crud/CrudDispatcher.java#L62-L69 | train |
fabric8io/mockwebserver | src/main/java/io/fabric8/mockwebserver/crud/CrudDispatcher.java | CrudDispatcher.handlePatch | public MockResponse handlePatch(String path, String s) {
MockResponse response = new MockResponse();
String body = doGet(path);
if (body == null) {
response.setResponseCode(404);
} else {
try {
JsonNode patch = context.getMapper().readTree(s);
... | java | public MockResponse handlePatch(String path, String s) {
MockResponse response = new MockResponse();
String body = doGet(path);
if (body == null) {
response.setResponseCode(404);
} else {
try {
JsonNode patch = context.getMapper().readTree(s);
... | [
"public",
"MockResponse",
"handlePatch",
"(",
"String",
"path",
",",
"String",
"s",
")",
"{",
"MockResponse",
"response",
"=",
"new",
"MockResponse",
"(",
")",
";",
"String",
"body",
"=",
"doGet",
"(",
"path",
")",
";",
"if",
"(",
"body",
"==",
"null",
... | Patches the specified object to the in-memory db.
@param path
@param s
@return | [
"Patches",
"the",
"specified",
"object",
"to",
"the",
"in",
"-",
"memory",
"db",
"."
] | ca14c6dd2ec8e2425585a548d5c0d993332b9d2f | https://github.com/fabric8io/mockwebserver/blob/ca14c6dd2ec8e2425585a548d5c0d993332b9d2f/src/main/java/io/fabric8/mockwebserver/crud/CrudDispatcher.java#L78-L100 | train |
fabric8io/mockwebserver | src/main/java/io/fabric8/mockwebserver/crud/CrudDispatcher.java | CrudDispatcher.handleDelete | public MockResponse handleDelete(String path) {
MockResponse response = new MockResponse();
List<AttributeSet> items = new ArrayList<>();
AttributeSet query = attributeExtractor.extract(path);
for (Map.Entry<AttributeSet, String> entry : map.entrySet()) {
if (entry.getKey().... | java | public MockResponse handleDelete(String path) {
MockResponse response = new MockResponse();
List<AttributeSet> items = new ArrayList<>();
AttributeSet query = attributeExtractor.extract(path);
for (Map.Entry<AttributeSet, String> entry : map.entrySet()) {
if (entry.getKey().... | [
"public",
"MockResponse",
"handleDelete",
"(",
"String",
"path",
")",
"{",
"MockResponse",
"response",
"=",
"new",
"MockResponse",
"(",
")",
";",
"List",
"<",
"AttributeSet",
">",
"items",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"AttributeSet",
"query"... | Performs a delete for the corresponding object from the in-memory db.
@param path
@return | [
"Performs",
"a",
"delete",
"for",
"the",
"corresponding",
"object",
"from",
"the",
"in",
"-",
"memory",
"db",
"."
] | ca14c6dd2ec8e2425585a548d5c0d993332b9d2f | https://github.com/fabric8io/mockwebserver/blob/ca14c6dd2ec8e2425585a548d5c0d993332b9d2f/src/main/java/io/fabric8/mockwebserver/crud/CrudDispatcher.java#L139-L158 | train |
nemerosa/ontrack | ontrack-extension-issues/src/main/java/net/nemerosa/ontrack/extension/issues/support/AbstractIssueServiceExtension.java | AbstractIssueServiceExtension.exportFormats | @Override
public List<ExportFormat> exportFormats(IssueServiceConfiguration issueServiceConfiguration) {
return issueExportServiceFactory.getIssueExportServices().stream()
.map(IssueExportService::getExportFormat)
.collect(Collectors.toList());
} | java | @Override
public List<ExportFormat> exportFormats(IssueServiceConfiguration issueServiceConfiguration) {
return issueExportServiceFactory.getIssueExportServices().stream()
.map(IssueExportService::getExportFormat)
.collect(Collectors.toList());
} | [
"@",
"Override",
"public",
"List",
"<",
"ExportFormat",
">",
"exportFormats",
"(",
"IssueServiceConfiguration",
"issueServiceConfiguration",
")",
"{",
"return",
"issueExportServiceFactory",
".",
"getIssueExportServices",
"(",
")",
".",
"stream",
"(",
")",
".",
"map",
... | Export of both text and HTML by default. | [
"Export",
"of",
"both",
"text",
"and",
"HTML",
"by",
"default",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-issues/src/main/java/net/nemerosa/ontrack/extension/issues/support/AbstractIssueServiceExtension.java#L57-L62 | train |
nemerosa/ontrack | ontrack-model/src/main/java/net/nemerosa/ontrack/model/structure/TemplateDefinition.java | TemplateDefinition.templateInstanceExecution | public TemplateInstanceExecution templateInstanceExecution(String sourceName, ExpressionEngine expressionEngine) {
// Transforms each parameter in a name/value pair, using only the source name as input
Map<String, String> sourceNameInput = Collections.singletonMap("sourceName", sourceName);
Map<... | java | public TemplateInstanceExecution templateInstanceExecution(String sourceName, ExpressionEngine expressionEngine) {
// Transforms each parameter in a name/value pair, using only the source name as input
Map<String, String> sourceNameInput = Collections.singletonMap("sourceName", sourceName);
Map<... | [
"public",
"TemplateInstanceExecution",
"templateInstanceExecution",
"(",
"String",
"sourceName",
",",
"ExpressionEngine",
"expressionEngine",
")",
"{",
"// Transforms each parameter in a name/value pair, using only the source name as input",
"Map",
"<",
"String",
",",
"String",
">"... | Gets the execution context for the creation of a template instance.
@param sourceName Input for the expression
@param expressionEngine Expression engine to use
@return Transformed string | [
"Gets",
"the",
"execution",
"context",
"for",
"the",
"creation",
"of",
"a",
"template",
"instance",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-model/src/main/java/net/nemerosa/ontrack/model/structure/TemplateDefinition.java#L53-L71 | train |
nemerosa/ontrack | ontrack-extension-api/src/main/java/net/nemerosa/ontrack/extension/api/model/IssueChangeLogExportRequest.java | IssueChangeLogExportRequest.getGroupingSpecification | @JsonIgnore
public Map<String, Set<String>> getGroupingSpecification() {
Map<String, Set<String>> result = new LinkedHashMap<>();
if (!StringUtils.isBlank(grouping)) {
String[] groups = split(grouping, '|');
for (String group : groups) {
String[] groupSpec = s... | java | @JsonIgnore
public Map<String, Set<String>> getGroupingSpecification() {
Map<String, Set<String>> result = new LinkedHashMap<>();
if (!StringUtils.isBlank(grouping)) {
String[] groups = split(grouping, '|');
for (String group : groups) {
String[] groupSpec = s... | [
"@",
"JsonIgnore",
"public",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"getGroupingSpecification",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"result",
"=",
"new",
"LinkedHashMap",
"<>",
"(",
")",
";",
... | Parses the specification and returns a map of groups x set of types. The map will be empty
if no group is defined, but never null. | [
"Parses",
"the",
"specification",
"and",
"returns",
"a",
"map",
"of",
"groups",
"x",
"set",
"of",
"types",
".",
"The",
"map",
"will",
"be",
"empty",
"if",
"no",
"group",
"is",
"defined",
"but",
"never",
"null",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-api/src/main/java/net/nemerosa/ontrack/extension/api/model/IssueChangeLogExportRequest.java#L80-L102 | train |
nemerosa/ontrack | ontrack-extension-api/src/main/java/net/nemerosa/ontrack/extension/api/model/IssueChangeLogExportRequest.java | IssueChangeLogExportRequest.getExcludedTypes | @JsonIgnore
public Set<String> getExcludedTypes() {
if (StringUtils.isBlank(exclude)) {
return Collections.emptySet();
} else {
return Sets.newHashSet(
Arrays.asList(
StringUtils.split(exclude, ",")
).stream(... | java | @JsonIgnore
public Set<String> getExcludedTypes() {
if (StringUtils.isBlank(exclude)) {
return Collections.emptySet();
} else {
return Sets.newHashSet(
Arrays.asList(
StringUtils.split(exclude, ",")
).stream(... | [
"@",
"JsonIgnore",
"public",
"Set",
"<",
"String",
">",
"getExcludedTypes",
"(",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"exclude",
")",
")",
"{",
"return",
"Collections",
".",
"emptySet",
"(",
")",
";",
"}",
"else",
"{",
"return",
"Se... | Parses the comma-separated list of excluded types. | [
"Parses",
"the",
"comma",
"-",
"separated",
"list",
"of",
"excluded",
"types",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-api/src/main/java/net/nemerosa/ontrack/extension/api/model/IssueChangeLogExportRequest.java#L107-L120 | train |
nemerosa/ontrack | ontrack-extension-ldap/src/main/java/net/nemerosa/ontrack/extension/ldap/LDAPController.java | LDAPController.getMappings | @RequestMapping(value = "ldap-mapping", method = RequestMethod.GET)
public Resources<LDAPMapping> getMappings() {
securityService.checkGlobalFunction(AccountGroupManagement.class);
return Resources.of(
accountGroupMappingService.getMappings(LDAPExtensionFeature.LDAP_GROUP_MAPPING)
... | java | @RequestMapping(value = "ldap-mapping", method = RequestMethod.GET)
public Resources<LDAPMapping> getMappings() {
securityService.checkGlobalFunction(AccountGroupManagement.class);
return Resources.of(
accountGroupMappingService.getMappings(LDAPExtensionFeature.LDAP_GROUP_MAPPING)
... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"ldap-mapping\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"LDAPMapping",
">",
"getMappings",
"(",
")",
"{",
"securityService",
".",
"checkGlobalFunction",
"(",
"AccountGroupManag... | Gets the list of mappings | [
"Gets",
"the",
"list",
"of",
"mappings"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-ldap/src/main/java/net/nemerosa/ontrack/extension/ldap/LDAPController.java#L60-L74 | train |
nemerosa/ontrack | ontrack-extension-ldap/src/main/java/net/nemerosa/ontrack/extension/ldap/LDAPController.java | LDAPController.getMappingCreationForm | @RequestMapping(value = "ldap-mapping/create", method = RequestMethod.GET)
public Form getMappingCreationForm() {
securityService.checkGlobalFunction(AccountGroupManagement.class);
return AccountGroupMapping.form(
accountService.getAccountGroups()
);
} | java | @RequestMapping(value = "ldap-mapping/create", method = RequestMethod.GET)
public Form getMappingCreationForm() {
securityService.checkGlobalFunction(AccountGroupManagement.class);
return AccountGroupMapping.form(
accountService.getAccountGroups()
);
} | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"ldap-mapping/create\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Form",
"getMappingCreationForm",
"(",
")",
"{",
"securityService",
".",
"checkGlobalFunction",
"(",
"AccountGroupManagement",
".",
"... | Gets the form for the creation of a mapping | [
"Gets",
"the",
"form",
"for",
"the",
"creation",
"of",
"a",
"mapping"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-ldap/src/main/java/net/nemerosa/ontrack/extension/ldap/LDAPController.java#L79-L85 | train |
nemerosa/ontrack | ontrack-extension-general/src/main/java/net/nemerosa/ontrack/extension/general/ReleasePropertyType.java | ReleasePropertyType.canEdit | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity, PromotionRunCreate.class);
} | java | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity, PromotionRunCreate.class);
} | [
"@",
"Override",
"public",
"boolean",
"canEdit",
"(",
"ProjectEntity",
"entity",
",",
"SecurityService",
"securityService",
")",
"{",
"return",
"securityService",
".",
"isProjectFunctionGranted",
"(",
"entity",
",",
"PromotionRunCreate",
".",
"class",
")",
";",
"}"
... | If one can promote a build, he can also attach a release label to a build. | [
"If",
"one",
"can",
"promote",
"a",
"build",
"he",
"can",
"also",
"attach",
"a",
"release",
"label",
"to",
"a",
"build",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-general/src/main/java/net/nemerosa/ontrack/extension/general/ReleasePropertyType.java#L48-L51 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PredefinedPromotionLevelController.java | PredefinedPromotionLevelController.getPredefinedPromotionLevelList | @RequestMapping(value = "predefinedPromotionLevels", method = RequestMethod.GET)
public Resources<PredefinedPromotionLevel> getPredefinedPromotionLevelList() {
return Resources.of(
predefinedPromotionLevelService.getPredefinedPromotionLevels(),
uri(on(getClass()).getPredefine... | java | @RequestMapping(value = "predefinedPromotionLevels", method = RequestMethod.GET)
public Resources<PredefinedPromotionLevel> getPredefinedPromotionLevelList() {
return Resources.of(
predefinedPromotionLevelService.getPredefinedPromotionLevels(),
uri(on(getClass()).getPredefine... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"predefinedPromotionLevels\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"PredefinedPromotionLevel",
">",
"getPredefinedPromotionLevelList",
"(",
")",
"{",
"return",
"Resources",
".",
... | Gets the list of predefined promotion levels. | [
"Gets",
"the",
"list",
"of",
"predefined",
"promotion",
"levels",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PredefinedPromotionLevelController.java#L43-L55 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/EventController.java | EventController.getEvents | @RequestMapping(value = "root", method = RequestMethod.GET)
public Resources<UIEvent> getEvents(
@RequestParam(required = false, defaultValue = "0") int offset,
@RequestParam(required = false, defaultValue = "20") int count) {
// Gets the events
Resources<UIEvent> resources =... | java | @RequestMapping(value = "root", method = RequestMethod.GET)
public Resources<UIEvent> getEvents(
@RequestParam(required = false, defaultValue = "0") int offset,
@RequestParam(required = false, defaultValue = "20") int count) {
// Gets the events
Resources<UIEvent> resources =... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"root\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"UIEvent",
">",
"getEvents",
"(",
"@",
"RequestParam",
"(",
"required",
"=",
"false",
",",
"defaultValue",
"=",
"\"0\"",
... | Gets the list of events for the root. | [
"Gets",
"the",
"list",
"of",
"events",
"for",
"the",
"root",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/EventController.java#L43-L72 | train |
nemerosa/ontrack | ontrack-service/src/main/java/net/nemerosa/ontrack/service/security/FileConfidentialStore.java | FileConfidentialStore.store | @Override
public void store(String key, byte[] payload) throws IOException {
try {
Cipher sym = Cipher.getInstance("AES");
sym.init(Cipher.ENCRYPT_MODE, masterKey);
try (
FileOutputStream fos = new FileOutputStream(getFileFor(key));
... | java | @Override
public void store(String key, byte[] payload) throws IOException {
try {
Cipher sym = Cipher.getInstance("AES");
sym.init(Cipher.ENCRYPT_MODE, masterKey);
try (
FileOutputStream fos = new FileOutputStream(getFileFor(key));
... | [
"@",
"Override",
"public",
"void",
"store",
"(",
"String",
"key",
",",
"byte",
"[",
"]",
"payload",
")",
"throws",
"IOException",
"{",
"try",
"{",
"Cipher",
"sym",
"=",
"Cipher",
".",
"getInstance",
"(",
"\"AES\"",
")",
";",
"sym",
".",
"init",
"(",
... | Persists the payload of a key to the disk. | [
"Persists",
"the",
"payload",
"of",
"a",
"key",
"to",
"the",
"disk",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-service/src/main/java/net/nemerosa/ontrack/service/security/FileConfidentialStore.java#L71-L86 | train |
nemerosa/ontrack | ontrack-extension-combined/src/main/java/net/nemerosa/ontrack/extension/issues/combined/CombinedIssueServiceController.java | CombinedIssueServiceController.getConfigurationList | @RequestMapping(value = "configurations", method = RequestMethod.GET)
public Resources<CombinedIssueServiceConfiguration> getConfigurationList() {
return Resources.of(
configurationService.getConfigurationList(),
uri(on(getClass()).getConfigurationList())
)
... | java | @RequestMapping(value = "configurations", method = RequestMethod.GET)
public Resources<CombinedIssueServiceConfiguration> getConfigurationList() {
return Resources.of(
configurationService.getConfigurationList(),
uri(on(getClass()).getConfigurationList())
)
... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"configurations\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"CombinedIssueServiceConfiguration",
">",
"getConfigurationList",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"("... | Gets the list of configurations | [
"Gets",
"the",
"list",
"of",
"configurations"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-combined/src/main/java/net/nemerosa/ontrack/extension/issues/combined/CombinedIssueServiceController.java#L47-L55 | train |
nemerosa/ontrack | ontrack-extension-combined/src/main/java/net/nemerosa/ontrack/extension/issues/combined/CombinedIssueServiceController.java | CombinedIssueServiceController.getConfigurationForm | @RequestMapping(value = "configurations/create", method = RequestMethod.GET)
public Form getConfigurationForm() {
return CombinedIssueServiceConfiguration.form(
configurationService.getAvailableIssueServiceConfigurations()
);
} | java | @RequestMapping(value = "configurations/create", method = RequestMethod.GET)
public Form getConfigurationForm() {
return CombinedIssueServiceConfiguration.form(
configurationService.getAvailableIssueServiceConfigurations()
);
} | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"configurations/create\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Form",
"getConfigurationForm",
"(",
")",
"{",
"return",
"CombinedIssueServiceConfiguration",
".",
"form",
"(",
"configurationService... | Form for a new configuration | [
"Form",
"for",
"a",
"new",
"configuration"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-combined/src/main/java/net/nemerosa/ontrack/extension/issues/combined/CombinedIssueServiceController.java#L60-L65 | train |
nemerosa/ontrack | ontrack-ui-graphql/src/main/java/net/nemerosa/ontrack/graphql/support/GraphqlUtils.java | GraphqlUtils.checkArgList | public static void checkArgList(DataFetchingEnvironment environment, String... args) {
Set<String> actualArgs = getActualArguments(environment).keySet();
Set<String> expectedArgs = new HashSet<>(Arrays.asList(args));
if (!Objects.equals(actualArgs, expectedArgs)) {
throw new IllegalS... | java | public static void checkArgList(DataFetchingEnvironment environment, String... args) {
Set<String> actualArgs = getActualArguments(environment).keySet();
Set<String> expectedArgs = new HashSet<>(Arrays.asList(args));
if (!Objects.equals(actualArgs, expectedArgs)) {
throw new IllegalS... | [
"public",
"static",
"void",
"checkArgList",
"(",
"DataFetchingEnvironment",
"environment",
",",
"String",
"...",
"args",
")",
"{",
"Set",
"<",
"String",
">",
"actualArgs",
"=",
"getActualArguments",
"(",
"environment",
")",
".",
"keySet",
"(",
")",
";",
"Set",... | Checks list of arguments | [
"Checks",
"list",
"of",
"arguments"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui-graphql/src/main/java/net/nemerosa/ontrack/graphql/support/GraphqlUtils.java#L129-L141 | train |
nemerosa/ontrack | ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/property/SVNBranchConfigurationProperty.java | SVNBranchConfigurationProperty.getCuredBranchPath | @JsonIgnore
public String getCuredBranchPath() {
String trim = StringUtils.trim(branchPath);
if ("/".equals(trim)) {
return trim;
} else {
return StringUtils.stripEnd(trim, "/");
}
} | java | @JsonIgnore
public String getCuredBranchPath() {
String trim = StringUtils.trim(branchPath);
if ("/".equals(trim)) {
return trim;
} else {
return StringUtils.stripEnd(trim, "/");
}
} | [
"@",
"JsonIgnore",
"public",
"String",
"getCuredBranchPath",
"(",
")",
"{",
"String",
"trim",
"=",
"StringUtils",
".",
"trim",
"(",
"branchPath",
")",
";",
"if",
"(",
"\"/\"",
".",
"equals",
"(",
"trim",
")",
")",
"{",
"return",
"trim",
";",
"}",
"else... | Returns a path which has been cleaned from its trailing or leading components. | [
"Returns",
"a",
"path",
"which",
"has",
"been",
"cleaned",
"from",
"its",
"trailing",
"or",
"leading",
"components",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/property/SVNBranchConfigurationProperty.java#L40-L48 | train |
nemerosa/ontrack | ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/service/IndexationServiceImpl.java | IndexationServiceImpl.indexInTransaction | private void indexInTransaction(SVNRepository repository, SVNLogEntry logEntry) throws SVNException {
// Log values
long revision = logEntry.getRevision();
String author = logEntry.getAuthor();
String message = logEntry.getMessage();
Date date = logEntry.getDate();
// San... | java | private void indexInTransaction(SVNRepository repository, SVNLogEntry logEntry) throws SVNException {
// Log values
long revision = logEntry.getRevision();
String author = logEntry.getAuthor();
String message = logEntry.getMessage();
Date date = logEntry.getDate();
// San... | [
"private",
"void",
"indexInTransaction",
"(",
"SVNRepository",
"repository",
",",
"SVNLogEntry",
"logEntry",
")",
"throws",
"SVNException",
"{",
"// Log values",
"long",
"revision",
"=",
"logEntry",
".",
"getRevision",
"(",
")",
";",
"String",
"author",
"=",
"logE... | This method is executed within a transaction | [
"This",
"method",
"is",
"executed",
"within",
"a",
"transaction"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/service/IndexationServiceImpl.java#L302-L330 | train |
nemerosa/ontrack | ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/service/IndexationServiceImpl.java | IndexationServiceImpl.index | protected void index(SVNRepository repository, long from, long to, JobRunListener runListener) {
// Ordering
if (from > to) {
long t = from;
from = to;
to = t;
}
// Range
long min = from;
long max = to;
// Opens a transaction
... | java | protected void index(SVNRepository repository, long from, long to, JobRunListener runListener) {
// Ordering
if (from > to) {
long t = from;
from = to;
to = t;
}
// Range
long min = from;
long max = to;
// Opens a transaction
... | [
"protected",
"void",
"index",
"(",
"SVNRepository",
"repository",
",",
"long",
"from",
",",
"long",
"to",
",",
"JobRunListener",
"runListener",
")",
"{",
"// Ordering",
"if",
"(",
"from",
">",
"to",
")",
"{",
"long",
"t",
"=",
"from",
";",
"from",
"=",
... | Indexation of a range in a thread for one repository - since it is called by a single thread executor, we can
be sure that only one call of this method is running at one time for one given repository. | [
"Indexation",
"of",
"a",
"range",
"in",
"a",
"thread",
"for",
"one",
"repository",
"-",
"since",
"it",
"is",
"called",
"by",
"a",
"single",
"thread",
"executor",
"we",
"can",
"be",
"sure",
"that",
"only",
"one",
"call",
"of",
"this",
"method",
"is",
"r... | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/service/IndexationServiceImpl.java#L449-L491 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/support/WebSecurityConfig.java | WebSecurityConfig.configure | @Override
protected void configure(HttpSecurity http) throws Exception {
// Gets a secure random key for the remember be token key
SecureRandom random = new SecureRandom();
byte[] randomBytes = new byte[64];
random.nextBytes(randomBytes);
String rememberBeKey = new String(Hex... | java | @Override
protected void configure(HttpSecurity http) throws Exception {
// Gets a secure random key for the remember be token key
SecureRandom random = new SecureRandom();
byte[] randomBytes = new byte[64];
random.nextBytes(randomBytes);
String rememberBeKey = new String(Hex... | [
"@",
"Override",
"protected",
"void",
"configure",
"(",
"HttpSecurity",
"http",
")",
"throws",
"Exception",
"{",
"// Gets a secure random key for the remember be token key",
"SecureRandom",
"random",
"=",
"new",
"SecureRandom",
"(",
")",
";",
"byte",
"[",
"]",
"random... | By default, all queries are accessible anonymously. Security is enforced at service level. | [
"By",
"default",
"all",
"queries",
"are",
"accessible",
"anonymously",
".",
"Security",
"is",
"enforced",
"at",
"service",
"level",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/support/WebSecurityConfig.java#L36-L71 | train |
nemerosa/ontrack | ontrack-extension-general/src/main/java/net/nemerosa/ontrack/extension/general/AutoPromotionPropertyType.java | AutoPromotionPropertyType.forStorage | @Override
public JsonNode forStorage(AutoPromotionProperty value) {
return format(
MapBuilder.create()
.with("validationStamps", value.getValidationStamps().stream()
.map(Entity::id)
.collect(Collectors.t... | java | @Override
public JsonNode forStorage(AutoPromotionProperty value) {
return format(
MapBuilder.create()
.with("validationStamps", value.getValidationStamps().stream()
.map(Entity::id)
.collect(Collectors.t... | [
"@",
"Override",
"public",
"JsonNode",
"forStorage",
"(",
"AutoPromotionProperty",
"value",
")",
"{",
"return",
"format",
"(",
"MapBuilder",
".",
"create",
"(",
")",
".",
"with",
"(",
"\"validationStamps\"",
",",
"value",
".",
"getValidationStamps",
"(",
")",
... | As a list of validation stamp IDs | [
"As",
"a",
"list",
"of",
"validation",
"stamp",
"IDs"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-general/src/main/java/net/nemerosa/ontrack/extension/general/AutoPromotionPropertyType.java#L152-L163 | train |
nemerosa/ontrack | ontrack-model/src/main/java/net/nemerosa/ontrack/model/support/VersionInfoConfig.java | VersionInfoConfig.toInfo | public VersionInfo toInfo() {
return new VersionInfo(
parseDate(date),
display,
full,
branch,
build,
commit,
source,
sourceType
);
} | java | public VersionInfo toInfo() {
return new VersionInfo(
parseDate(date),
display,
full,
branch,
build,
commit,
source,
sourceType
);
} | [
"public",
"VersionInfo",
"toInfo",
"(",
")",
"{",
"return",
"new",
"VersionInfo",
"(",
"parseDate",
"(",
"date",
")",
",",
"display",
",",
"full",
",",
"branch",
",",
"build",
",",
"commit",
",",
"source",
",",
"sourceType",
")",
";",
"}"
] | Gets the representation of the version | [
"Gets",
"the",
"representation",
"of",
"the",
"version"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-model/src/main/java/net/nemerosa/ontrack/model/support/VersionInfoConfig.java#L64-L75 | train |
nemerosa/ontrack | ontrack-model/src/main/java/net/nemerosa/ontrack/model/extension/ExtensionFeatureOptions.java | ExtensionFeatureOptions.withDependency | public ExtensionFeatureOptions withDependency(ExtensionFeature feature) {
Set<String> existing = this.dependencies;
Set<String> newDependencies;
if (existing == null) {
newDependencies = new HashSet<>();
} else {
newDependencies = new HashSet<>(existing);
... | java | public ExtensionFeatureOptions withDependency(ExtensionFeature feature) {
Set<String> existing = this.dependencies;
Set<String> newDependencies;
if (existing == null) {
newDependencies = new HashSet<>();
} else {
newDependencies = new HashSet<>(existing);
... | [
"public",
"ExtensionFeatureOptions",
"withDependency",
"(",
"ExtensionFeature",
"feature",
")",
"{",
"Set",
"<",
"String",
">",
"existing",
"=",
"this",
".",
"dependencies",
";",
"Set",
"<",
"String",
">",
"newDependencies",
";",
"if",
"(",
"existing",
"==",
"... | Adds a dependency | [
"Adds",
"a",
"dependency"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-model/src/main/java/net/nemerosa/ontrack/model/extension/ExtensionFeatureOptions.java#L41-L51 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/AccountController.java | AccountController.getAccounts | @RequestMapping(value = "", method = RequestMethod.GET)
public Resources<Account> getAccounts() {
return Resources.of(
accountService.getAccounts(),
uri(on(getClass()).getAccounts())
)
.with(Link.CREATE, uri(on(AccountController.class).getCreationForm(... | java | @RequestMapping(value = "", method = RequestMethod.GET)
public Resources<Account> getAccounts() {
return Resources.of(
accountService.getAccounts(),
uri(on(getClass()).getAccounts())
)
.with(Link.CREATE, uri(on(AccountController.class).getCreationForm(... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"Account",
">",
"getAccounts",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"(",
"accountService",
".",
"getAccounts",
"... | List of accounts | [
"List",
"of",
"accounts"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/AccountController.java#L43-L52 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/AccountController.java | AccountController.getAccountMgtActions | @RequestMapping(value = "actions", method = RequestMethod.GET)
public Resources<Action> getAccountMgtActions() {
return Resources.of(
extensionManager.getExtensions(AccountMgtActionExtension.class).stream()
.map(this::resolveExtensionAction)
.f... | java | @RequestMapping(value = "actions", method = RequestMethod.GET)
public Resources<Action> getAccountMgtActions() {
return Resources.of(
extensionManager.getExtensions(AccountMgtActionExtension.class).stream()
.map(this::resolveExtensionAction)
.f... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"actions\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"Action",
">",
"getAccountMgtActions",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"(",
"extensionManager",
".",
"... | Action management contributions | [
"Action",
"management",
"contributions"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/AccountController.java#L57-L65 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/AccountController.java | AccountController.getCreationForm | @RequestMapping(value = "create", method = RequestMethod.GET)
public Form getCreationForm() {
return Form.create()
.with(Form.defaultNameField())
.with(Text.of("fullName").length(100).label("Full name").help("Display name for the account"))
.with(Email.of("ema... | java | @RequestMapping(value = "create", method = RequestMethod.GET)
public Form getCreationForm() {
return Form.create()
.with(Form.defaultNameField())
.with(Text.of("fullName").length(100).label("Full name").help("Display name for the account"))
.with(Email.of("ema... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"create\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Form",
"getCreationForm",
"(",
")",
"{",
"return",
"Form",
".",
"create",
"(",
")",
".",
"with",
"(",
"Form",
".",
"defaultNameField",
... | Form to create a built-in account | [
"Form",
"to",
"create",
"a",
"built",
"-",
"in",
"account"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/AccountController.java#L70-L81 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/AccountController.java | AccountController.getAccountGroups | @RequestMapping(value = "groups", method = RequestMethod.GET)
public Resources<AccountGroup> getAccountGroups() {
return Resources.of(
accountService.getAccountGroups(),
uri(on(getClass()).getAccountGroups())
)
.with(Link.CREATE, uri(on(AccountControll... | java | @RequestMapping(value = "groups", method = RequestMethod.GET)
public Resources<AccountGroup> getAccountGroups() {
return Resources.of(
accountService.getAccountGroups(),
uri(on(getClass()).getAccountGroups())
)
.with(Link.CREATE, uri(on(AccountControll... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"groups\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"AccountGroup",
">",
"getAccountGroups",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"(",
"accountService",
".",
"g... | List of groups | [
"List",
"of",
"groups"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/AccountController.java#L144-L151 | train |
nemerosa/ontrack | ontrack-extension-combined/src/main/java/net/nemerosa/ontrack/extension/issues/combined/CombinedIssueServiceExtension.java | CombinedIssueServiceExtension.getConfiguredIssueServices | protected Collection<ConfiguredIssueService> getConfiguredIssueServices(IssueServiceConfiguration issueServiceConfiguration) {
CombinedIssueServiceConfiguration combinedIssueServiceConfiguration = (CombinedIssueServiceConfiguration) issueServiceConfiguration;
return combinedIssueServiceConfiguration.get... | java | protected Collection<ConfiguredIssueService> getConfiguredIssueServices(IssueServiceConfiguration issueServiceConfiguration) {
CombinedIssueServiceConfiguration combinedIssueServiceConfiguration = (CombinedIssueServiceConfiguration) issueServiceConfiguration;
return combinedIssueServiceConfiguration.get... | [
"protected",
"Collection",
"<",
"ConfiguredIssueService",
">",
"getConfiguredIssueServices",
"(",
"IssueServiceConfiguration",
"issueServiceConfiguration",
")",
"{",
"CombinedIssueServiceConfiguration",
"combinedIssueServiceConfiguration",
"=",
"(",
"CombinedIssueServiceConfiguration",... | Gets the list of attached configured issue services.
@param issueServiceConfiguration Configuration of the combined issue service
@return List of associated configured issue services | [
"Gets",
"the",
"list",
"of",
"attached",
"configured",
"issue",
"services",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-combined/src/main/java/net/nemerosa/ontrack/extension/issues/combined/CombinedIssueServiceExtension.java#L46-L51 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/BranchController.java | BranchController.bulkUpdate | @RequestMapping(value = "branches/{branchId}/update/bulk", method = RequestMethod.GET)
public Form bulkUpdate(@SuppressWarnings("UnusedParameters") @PathVariable ID branchId) {
return Form.create()
.with(
Replacements.of("replacements")
... | java | @RequestMapping(value = "branches/{branchId}/update/bulk", method = RequestMethod.GET)
public Form bulkUpdate(@SuppressWarnings("UnusedParameters") @PathVariable ID branchId) {
return Form.create()
.with(
Replacements.of("replacements")
... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"branches/{branchId}/update/bulk\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Form",
"bulkUpdate",
"(",
"@",
"SuppressWarnings",
"(",
"\"UnusedParameters\"",
")",
"@",
"PathVariable",
"ID",
"branchI... | Gets the form for a bulk update of the branch | [
"Gets",
"the",
"form",
"for",
"a",
"bulk",
"update",
"of",
"the",
"branch"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/BranchController.java#L204-L212 | train |
nemerosa/ontrack | ontrack-model/src/main/java/net/nemerosa/ontrack/model/support/SelectableItem.java | SelectableItem.listOf | public static <T> List<SelectableItem> listOf(
Collection<T> items,
Function<T, String> idFn,
Function<T, String> nameFn,
Predicate<T> selectedFn
) {
return items.stream()
.map(i ->
new SelectableItem(
... | java | public static <T> List<SelectableItem> listOf(
Collection<T> items,
Function<T, String> idFn,
Function<T, String> nameFn,
Predicate<T> selectedFn
) {
return items.stream()
.map(i ->
new SelectableItem(
... | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"SelectableItem",
">",
"listOf",
"(",
"Collection",
"<",
"T",
">",
"items",
",",
"Function",
"<",
"T",
",",
"String",
">",
"idFn",
",",
"Function",
"<",
"T",
",",
"String",
">",
"nameFn",
",",
"Predicat... | Creation of a list of selectable items from a list of items, using an extractor for the id and the name,
and a predicate for the selection. | [
"Creation",
"of",
"a",
"list",
"of",
"selectable",
"items",
"from",
"a",
"list",
"of",
"items",
"using",
"an",
"extractor",
"for",
"the",
"id",
"and",
"the",
"name",
"and",
"a",
"predicate",
"for",
"the",
"selection",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-model/src/main/java/net/nemerosa/ontrack/model/support/SelectableItem.java#L25-L40 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/support/WebConfig.java | WebConfig.configureContentNegotiation | @Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorParameter(false);
configurer.favorPathExtension(false);
} | java | @Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorParameter(false);
configurer.favorPathExtension(false);
} | [
"@",
"Override",
"public",
"void",
"configureContentNegotiation",
"(",
"ContentNegotiationConfigurer",
"configurer",
")",
"{",
"configurer",
".",
"favorParameter",
"(",
"false",
")",
";",
"configurer",
".",
"favorPathExtension",
"(",
"false",
")",
";",
"}"
] | Uses the HTTP header for content negociation. | [
"Uses",
"the",
"HTTP",
"header",
"for",
"content",
"negociation",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/support/WebConfig.java#L46-L50 | train |
nemerosa/ontrack | ontrack-extension-github/src/main/java/net/nemerosa/ontrack/extension/github/GitHubIssueServiceExtension.java | GitHubIssueServiceExtension.getConfigurationByName | @Override
public IssueServiceConfiguration getConfigurationByName(String name) {
// Parsing of the name
String[] tokens = StringUtils.split(name, GitHubGitConfiguration.CONFIGURATION_REPOSITORY_SEPARATOR);
if (tokens == null || tokens.length != 2) {
throw new IllegalStateExceptio... | java | @Override
public IssueServiceConfiguration getConfigurationByName(String name) {
// Parsing of the name
String[] tokens = StringUtils.split(name, GitHubGitConfiguration.CONFIGURATION_REPOSITORY_SEPARATOR);
if (tokens == null || tokens.length != 2) {
throw new IllegalStateExceptio... | [
"@",
"Override",
"public",
"IssueServiceConfiguration",
"getConfigurationByName",
"(",
"String",
"name",
")",
"{",
"// Parsing of the name",
"String",
"[",
"]",
"tokens",
"=",
"StringUtils",
".",
"split",
"(",
"name",
",",
"GitHubGitConfiguration",
".",
"CONFIGURATION... | A GitHub configuration name
@param name Name of the configuration and repository.
@return Wrapper for the GitHub issue service.
@see net.nemerosa.ontrack.extension.github.property.GitHubGitConfiguration | [
"A",
"GitHub",
"configuration",
"name"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-github/src/main/java/net/nemerosa/ontrack/extension/github/GitHubIssueServiceExtension.java#L62-L75 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/ExtensionController.java | ExtensionController.getExtensions | @RequestMapping(value = "", method = RequestMethod.GET)
public Resource<ExtensionList> getExtensions() {
return Resource.of(
extensionManager.getExtensionList(),
uri(MvcUriComponentsBuilder.on(getClass()).getExtensions())
);
} | java | @RequestMapping(value = "", method = RequestMethod.GET)
public Resource<ExtensionList> getExtensions() {
return Resource.of(
extensionManager.getExtensionList(),
uri(MvcUriComponentsBuilder.on(getClass()).getExtensions())
);
} | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resource",
"<",
"ExtensionList",
">",
"getExtensions",
"(",
")",
"{",
"return",
"Resource",
".",
"of",
"(",
"extensionManager",
".",
"getExtens... | Gets the list of extensions. | [
"Gets",
"the",
"list",
"of",
"extensions",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/ExtensionController.java#L30-L36 | train |
nemerosa/ontrack | ontrack-model/src/main/java/net/nemerosa/ontrack/model/structure/Decoration.java | Decoration.of | public static <T> Decoration<T> of(Decorator<T> decorator, T data) {
Validate.notNull(decorator, "The decorator is required");
Validate.notNull(data, "The decoration data is required");
return new Decoration<>(decorator, data, null);
} | java | public static <T> Decoration<T> of(Decorator<T> decorator, T data) {
Validate.notNull(decorator, "The decorator is required");
Validate.notNull(data, "The decoration data is required");
return new Decoration<>(decorator, data, null);
} | [
"public",
"static",
"<",
"T",
">",
"Decoration",
"<",
"T",
">",
"of",
"(",
"Decorator",
"<",
"T",
">",
"decorator",
",",
"T",
"data",
")",
"{",
"Validate",
".",
"notNull",
"(",
"decorator",
",",
"\"The decorator is required\"",
")",
";",
"Validate",
".",... | Basic construction. Only the data is required | [
"Basic",
"construction",
".",
"Only",
"the",
"data",
"is",
"required"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-model/src/main/java/net/nemerosa/ontrack/model/structure/Decoration.java#L38-L42 | train |
nemerosa/ontrack | ontrack-model/src/main/java/net/nemerosa/ontrack/model/structure/Decoration.java | Decoration.error | public static <T> Decoration<T> error(Decorator<T> decorator, String error) {
Validate.notNull(decorator, "The decorator is required");
Validate.notBlank(error, "The decoration error is required");
return new Decoration<>(decorator, null, error);
} | java | public static <T> Decoration<T> error(Decorator<T> decorator, String error) {
Validate.notNull(decorator, "The decorator is required");
Validate.notBlank(error, "The decoration error is required");
return new Decoration<>(decorator, null, error);
} | [
"public",
"static",
"<",
"T",
">",
"Decoration",
"<",
"T",
">",
"error",
"(",
"Decorator",
"<",
"T",
">",
"decorator",
",",
"String",
"error",
")",
"{",
"Validate",
".",
"notNull",
"(",
"decorator",
",",
"\"The decorator is required\"",
")",
";",
"Validate... | Basic construction. With an error | [
"Basic",
"construction",
".",
"With",
"an",
"error"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-model/src/main/java/net/nemerosa/ontrack/model/structure/Decoration.java#L47-L51 | train |
nemerosa/ontrack | ontrack-extension-stash/src/main/java/net/nemerosa/ontrack/extension/stash/StashController.java | StashController.getConfigurations | @RequestMapping(value = "configurations", method = RequestMethod.GET)
public Resources<StashConfiguration> getConfigurations() {
return Resources.of(
configurationService.getConfigurations(),
uri(on(getClass()).getConfigurations())
)
.with(Link.CREATE,... | java | @RequestMapping(value = "configurations", method = RequestMethod.GET)
public Resources<StashConfiguration> getConfigurations() {
return Resources.of(
configurationService.getConfigurations(),
uri(on(getClass()).getConfigurations())
)
.with(Link.CREATE,... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"configurations\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"StashConfiguration",
">",
"getConfigurations",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"(",
"configuration... | Gets the configurations | [
"Gets",
"the",
"configurations"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-stash/src/main/java/net/nemerosa/ontrack/extension/stash/StashController.java#L52-L61 | train |
nemerosa/ontrack | ontrack-extension-scm/src/main/java/net/nemerosa/ontrack/extension/scm/SCMController.java | SCMController.createChangeLogFileFilterForm | @RequestMapping(value = "changeLog/fileFilter/{projectId}/create", method = RequestMethod.GET)
public Form createChangeLogFileFilterForm(@SuppressWarnings("UnusedParameters") @PathVariable ID projectId) {
return Form.create()
.with(Text.of("name")
.label("Name")
... | java | @RequestMapping(value = "changeLog/fileFilter/{projectId}/create", method = RequestMethod.GET)
public Form createChangeLogFileFilterForm(@SuppressWarnings("UnusedParameters") @PathVariable ID projectId) {
return Form.create()
.with(Text.of("name")
.label("Name")
... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"changeLog/fileFilter/{projectId}/create\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Form",
"createChangeLogFileFilterForm",
"(",
"@",
"SuppressWarnings",
"(",
"\"UnusedParameters\"",
")",
"@",
"PathVa... | Form to create a change log filter | [
"Form",
"to",
"create",
"a",
"change",
"log",
"filter"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-scm/src/main/java/net/nemerosa/ontrack/extension/scm/SCMController.java#L65-L75 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/InfoController.java | InfoController.info | @RequestMapping(value = "", method = RequestMethod.GET)
public Resource<Info> info() {
return Resource.of(
infoService.getInfo(),
uri(on(getClass()).info())
)
// API links
.with("user", uri(on(UserController.class).getCurrentUser()))
... | java | @RequestMapping(value = "", method = RequestMethod.GET)
public Resource<Info> info() {
return Resource.of(
infoService.getInfo(),
uri(on(getClass()).info())
)
// API links
.with("user", uri(on(UserController.class).getCurrentUser()))
... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resource",
"<",
"Info",
">",
"info",
"(",
")",
"{",
"return",
"Resource",
".",
"of",
"(",
"infoService",
".",
"getInfo",
"(",
")",
",",
... | General information about the application | [
"General",
"information",
"about",
"the",
"application"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/InfoController.java#L33-L45 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/InfoController.java | InfoController.applicationInfo | @RequestMapping(value = "application", method = RequestMethod.GET)
public Resources<ApplicationInfo> applicationInfo() {
return Resources.of(
applicationInfoService.getApplicationInfoList(),
uri(on(InfoController.class).applicationInfo())
);
} | java | @RequestMapping(value = "application", method = RequestMethod.GET)
public Resources<ApplicationInfo> applicationInfo() {
return Resources.of(
applicationInfoService.getApplicationInfoList(),
uri(on(InfoController.class).applicationInfo())
);
} | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"application\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"ApplicationInfo",
">",
"applicationInfo",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"(",
"applicationInfoServic... | Messages about the application | [
"Messages",
"about",
"the",
"application"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/InfoController.java#L50-L56 | train |
nemerosa/ontrack | ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/property/SVNBranchConfigurationPropertyType.java | SVNBranchConfigurationPropertyType.canEdit | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class) &&
propertyService.hasProperty(
entity.getProject(),
SVNProjectCo... | java | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class) &&
propertyService.hasProperty(
entity.getProject(),
SVNProjectCo... | [
"@",
"Override",
"public",
"boolean",
"canEdit",
"(",
"ProjectEntity",
"entity",
",",
"SecurityService",
"securityService",
")",
"{",
"return",
"securityService",
".",
"isProjectFunctionGranted",
"(",
"entity",
".",
"projectId",
"(",
")",
",",
"ProjectConfig",
".",
... | One can edit the SVN configuration of a branch only if he can configurure a project and if the project
is itself configured with SVN. | [
"One",
"can",
"edit",
"the",
"SVN",
"configuration",
"of",
"a",
"branch",
"only",
"if",
"he",
"can",
"configurure",
"a",
"project",
"and",
"if",
"the",
"project",
"is",
"itself",
"configured",
"with",
"SVN",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/property/SVNBranchConfigurationPropertyType.java#L60-L66 | train |
nemerosa/ontrack | ontrack-service/src/main/java/net/nemerosa/ontrack/service/ValidationRunStatusServiceImpl.java | ValidationRunStatusServiceImpl.start | @Override
public void start() {
register(STATUS_PASSED);
register(STATUS_FIXED);
register(STATUS_DEFECTIVE);
register(STATUS_EXPLAINED, FIXED);
register(STATUS_INVESTIGATING, DEFECTIVE, EXPLAINED, FIXED);
register(STATUS_INTERRUPTED, INVESTIGATING, FIXED);
reg... | java | @Override
public void start() {
register(STATUS_PASSED);
register(STATUS_FIXED);
register(STATUS_DEFECTIVE);
register(STATUS_EXPLAINED, FIXED);
register(STATUS_INVESTIGATING, DEFECTIVE, EXPLAINED, FIXED);
register(STATUS_INTERRUPTED, INVESTIGATING, FIXED);
reg... | [
"@",
"Override",
"public",
"void",
"start",
"(",
")",
"{",
"register",
"(",
"STATUS_PASSED",
")",
";",
"register",
"(",
"STATUS_FIXED",
")",
";",
"register",
"(",
"STATUS_DEFECTIVE",
")",
";",
"register",
"(",
"STATUS_EXPLAINED",
",",
"FIXED",
")",
";",
"r... | Registers the tree of validation run status ids. | [
"Registers",
"the",
"tree",
"of",
"validation",
"run",
"status",
"ids",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-service/src/main/java/net/nemerosa/ontrack/service/ValidationRunStatusServiceImpl.java#L63-L90 | train |
nemerosa/ontrack | ontrack-service/src/main/java/net/nemerosa/ontrack/service/DecorationServiceImpl.java | DecorationServiceImpl.getDecorations | protected <T> List<? extends Decoration> getDecorations(ProjectEntity entity, Decorator<T> decorator) {
try {
return decorator.getDecorations(entity);
} catch (Exception ex) {
return Collections.singletonList(
Decoration.error(decorator, getErrorMessage(ex))
... | java | protected <T> List<? extends Decoration> getDecorations(ProjectEntity entity, Decorator<T> decorator) {
try {
return decorator.getDecorations(entity);
} catch (Exception ex) {
return Collections.singletonList(
Decoration.error(decorator, getErrorMessage(ex))
... | [
"protected",
"<",
"T",
">",
"List",
"<",
"?",
"extends",
"Decoration",
">",
"getDecorations",
"(",
"ProjectEntity",
"entity",
",",
"Decorator",
"<",
"T",
">",
"decorator",
")",
"{",
"try",
"{",
"return",
"decorator",
".",
"getDecorations",
"(",
"entity",
"... | Gets the decoration for an entity, and returns an "error" decoration in case of problem. | [
"Gets",
"the",
"decoration",
"for",
"an",
"entity",
"and",
"returns",
"an",
"error",
"decoration",
"in",
"case",
"of",
"problem",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-service/src/main/java/net/nemerosa/ontrack/service/DecorationServiceImpl.java#L54-L62 | train |
nemerosa/ontrack | ontrack-common/src/main/java/net/nemerosa/ontrack/common/Utils.java | Utils.asList | public static List<String> asList(String text) {
if (StringUtils.isBlank(text)) {
return Collections.emptyList();
} else {
try {
return IOUtils.readLines(new StringReader(text));
} catch (IOException e) {
throw new RuntimeException("Can... | java | public static List<String> asList(String text) {
if (StringUtils.isBlank(text)) {
return Collections.emptyList();
} else {
try {
return IOUtils.readLines(new StringReader(text));
} catch (IOException e) {
throw new RuntimeException("Can... | [
"public",
"static",
"List",
"<",
"String",
">",
"asList",
"(",
"String",
"text",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"text",
")",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"else",
"{",
"try",
"{",
... | Splits a text in several lines.
@param text Text to split
@return Lines. This can be empty but not null. | [
"Splits",
"a",
"text",
"in",
"several",
"lines",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-common/src/main/java/net/nemerosa/ontrack/common/Utils.java#L52-L62 | train |
nemerosa/ontrack | ontrack-common/src/main/java/net/nemerosa/ontrack/common/Utils.java | Utils.toHexString | public static String toHexString(byte[] bytes, int start, int len) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < len; i++) {
int b = bytes[start + i] & 0xFF;
if (b < 16) buf.append('0');
buf.append(Integer.toHexString(b));
}
return buf... | java | public static String toHexString(byte[] bytes, int start, int len) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < len; i++) {
int b = bytes[start + i] & 0xFF;
if (b < 16) buf.append('0');
buf.append(Integer.toHexString(b));
}
return buf... | [
"public",
"static",
"String",
"toHexString",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"start",
",",
"int",
"len",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"len... | Writes some bytes in Hexadecimal format
@param bytes Bytes to format
@param start Start position for the conversion
@param len Number of bytes to convert
@return Hex string | [
"Writes",
"some",
"bytes",
"in",
"Hexadecimal",
"format"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-common/src/main/java/net/nemerosa/ontrack/common/Utils.java#L118-L126 | train |
nemerosa/ontrack | ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/property/SVNSyncPropertyType.java | SVNSyncPropertyType.canEdit | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity, ProjectConfig.class) &&
propertyService.hasProperty(
entity,
SVNBranchConfigurationPropertyType.cl... | java | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity, ProjectConfig.class) &&
propertyService.hasProperty(
entity,
SVNBranchConfigurationPropertyType.cl... | [
"@",
"Override",
"public",
"boolean",
"canEdit",
"(",
"ProjectEntity",
"entity",
",",
"SecurityService",
"securityService",
")",
"{",
"return",
"securityService",
".",
"isProjectFunctionGranted",
"(",
"entity",
",",
"ProjectConfig",
".",
"class",
")",
"&&",
"propert... | One can edit the SVN synchronisation only if he can configure the project and if the branch
is configured for SVN. | [
"One",
"can",
"edit",
"the",
"SVN",
"synchronisation",
"only",
"if",
"he",
"can",
"configure",
"the",
"project",
"and",
"if",
"the",
"branch",
"is",
"configured",
"for",
"SVN",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/property/SVNSyncPropertyType.java#L55-L61 | train |
nemerosa/ontrack | ontrack-extension-jenkins/src/main/java/net/nemerosa/ontrack/extension/jenkins/JenkinsController.java | JenkinsController.getConfigurationsDescriptors | @RequestMapping(value = "configurations/descriptors", method = RequestMethod.GET)
public Resources<ConfigurationDescriptor> getConfigurationsDescriptors() {
return Resources.of(
jenkinsService.getConfigurationDescriptors(),
uri(on(getClass()).getConfigurationsDescriptors())
... | java | @RequestMapping(value = "configurations/descriptors", method = RequestMethod.GET)
public Resources<ConfigurationDescriptor> getConfigurationsDescriptors() {
return Resources.of(
jenkinsService.getConfigurationDescriptors(),
uri(on(getClass()).getConfigurationsDescriptors())
... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"configurations/descriptors\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"ConfigurationDescriptor",
">",
"getConfigurationsDescriptors",
"(",
")",
"{",
"return",
"Resources",
".",
"... | Gets the configuration descriptors | [
"Gets",
"the",
"configuration",
"descriptors"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-jenkins/src/main/java/net/nemerosa/ontrack/extension/jenkins/JenkinsController.java#L63-L69 | train |
nemerosa/ontrack | ontrack-extension-api/src/main/java/net/nemerosa/ontrack/extension/support/AbstractConfigurationService.java | AbstractConfigurationService.injectCredentials | protected T injectCredentials(T configuration) {
T oldConfig = findConfiguration(configuration.getName()).orElse(null);
T target;
if (StringUtils.isBlank(configuration.getPassword())) {
if (oldConfig != null && StringUtils.equals(oldConfig.getUser(), configuration.getUser())) {
... | java | protected T injectCredentials(T configuration) {
T oldConfig = findConfiguration(configuration.getName()).orElse(null);
T target;
if (StringUtils.isBlank(configuration.getPassword())) {
if (oldConfig != null && StringUtils.equals(oldConfig.getUser(), configuration.getUser())) {
... | [
"protected",
"T",
"injectCredentials",
"(",
"T",
"configuration",
")",
"{",
"T",
"oldConfig",
"=",
"findConfiguration",
"(",
"configuration",
".",
"getName",
"(",
")",
")",
".",
"orElse",
"(",
"null",
")",
";",
"T",
"target",
";",
"if",
"(",
"StringUtils",... | Adjust a configuration so that it contains a password if
1) the password is empty
2) the configuration already exists
3) the user name is the same | [
"Adjust",
"a",
"configuration",
"so",
"that",
"it",
"contains",
"a",
"password",
"if",
"1",
")",
"the",
"password",
"is",
"empty",
"2",
")",
"the",
"configuration",
"already",
"exists",
"3",
")",
"the",
"user",
"name",
"is",
"the",
"same"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-api/src/main/java/net/nemerosa/ontrack/extension/support/AbstractConfigurationService.java#L119-L132 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PredefinedValidationStampController.java | PredefinedValidationStampController.getPredefinedValidationStampList | @RequestMapping(value = "predefinedValidationStamps", method = RequestMethod.GET)
public Resources<PredefinedValidationStamp> getPredefinedValidationStampList() {
return Resources.of(
predefinedValidationStampService.getPredefinedValidationStamps(),
uri(on(getClass()).getPred... | java | @RequestMapping(value = "predefinedValidationStamps", method = RequestMethod.GET)
public Resources<PredefinedValidationStamp> getPredefinedValidationStampList() {
return Resources.of(
predefinedValidationStampService.getPredefinedValidationStamps(),
uri(on(getClass()).getPred... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"predefinedValidationStamps\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"PredefinedValidationStamp",
">",
"getPredefinedValidationStampList",
"(",
")",
"{",
"return",
"Resources",
".... | Gets the list of predefined validation stamps. | [
"Gets",
"the",
"list",
"of",
"predefined",
"validation",
"stamps",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PredefinedValidationStampController.java#L45-L53 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/SettingsController.java | SettingsController.configuration | @RequestMapping(value = "", method = RequestMethod.GET)
public Resources<DescribedForm> configuration() {
securityService.checkGlobalFunction(GlobalSettings.class);
List<DescribedForm> forms = settingsManagers.stream()
.sorted((o1, o2) -> o1.getTitle().compareTo(o2.getTitle()))
... | java | @RequestMapping(value = "", method = RequestMethod.GET)
public Resources<DescribedForm> configuration() {
securityService.checkGlobalFunction(GlobalSettings.class);
List<DescribedForm> forms = settingsManagers.stream()
.sorted((o1, o2) -> o1.getTitle().compareTo(o2.getTitle()))
... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"DescribedForm",
">",
"configuration",
"(",
")",
"{",
"securityService",
".",
"checkGlobalFunction",
"(",
"GlobalSettings",
".",
... | List of forms to configure. | [
"List",
"of",
"forms",
"to",
"configure",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/SettingsController.java#L48-L60 | train |
nemerosa/ontrack | ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/support/RevisionPattern.java | RevisionPattern.extractRevision | public OptionalLong extractRevision(String buildName) {
// Gets the regex for the pattern
String regex = getRegex();
// Matching
Matcher matcher = Pattern.compile(regex).matcher(buildName);
if (matcher.matches()) {
String token = matcher.group(1);
return O... | java | public OptionalLong extractRevision(String buildName) {
// Gets the regex for the pattern
String regex = getRegex();
// Matching
Matcher matcher = Pattern.compile(regex).matcher(buildName);
if (matcher.matches()) {
String token = matcher.group(1);
return O... | [
"public",
"OptionalLong",
"extractRevision",
"(",
"String",
"buildName",
")",
"{",
"// Gets the regex for the pattern",
"String",
"regex",
"=",
"getRegex",
"(",
")",
";",
"// Matching",
"Matcher",
"matcher",
"=",
"Pattern",
".",
"compile",
"(",
"regex",
")",
".",
... | Extracts the revision from a build name. | [
"Extracts",
"the",
"revision",
"from",
"a",
"build",
"name",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/support/RevisionPattern.java#L46-L59 | train |
nemerosa/ontrack | ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/model/OntrackSVNIssueInfo.java | OntrackSVNIssueInfo.empty | public static OntrackSVNIssueInfo empty(SVNConfiguration configuration) {
return new OntrackSVNIssueInfo(
configuration,
null,
null,
Collections.emptyList(),
Collections.emptyList()
);
} | java | public static OntrackSVNIssueInfo empty(SVNConfiguration configuration) {
return new OntrackSVNIssueInfo(
configuration,
null,
null,
Collections.emptyList(),
Collections.emptyList()
);
} | [
"public",
"static",
"OntrackSVNIssueInfo",
"empty",
"(",
"SVNConfiguration",
"configuration",
")",
"{",
"return",
"new",
"OntrackSVNIssueInfo",
"(",
"configuration",
",",
"null",
",",
"null",
",",
"Collections",
".",
"emptyList",
"(",
")",
",",
"Collections",
".",... | Empty issue info. | [
"Empty",
"issue",
"info",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/model/OntrackSVNIssueInfo.java#L19-L27 | train |
nemerosa/ontrack | ontrack-extension-jenkins/src/main/java/net/nemerosa/ontrack/extension/jenkins/JenkinsBuildPropertyType.java | JenkinsBuildPropertyType.canEdit | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
switch (entity.getProjectEntityType()) {
case BUILD:
return securityService.isProjectFunctionGranted(entity, BuildCreate.class);
case PROMOTION_RUN:
return securi... | java | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
switch (entity.getProjectEntityType()) {
case BUILD:
return securityService.isProjectFunctionGranted(entity, BuildCreate.class);
case PROMOTION_RUN:
return securi... | [
"@",
"Override",
"public",
"boolean",
"canEdit",
"(",
"ProjectEntity",
"entity",
",",
"SecurityService",
"securityService",
")",
"{",
"switch",
"(",
"entity",
".",
"getProjectEntityType",
"(",
")",
")",
"{",
"case",
"BUILD",
":",
"return",
"securityService",
"."... | Depends on the nature of the entity. Allowed to the ones who can create the associated entity. | [
"Depends",
"on",
"the",
"nature",
"of",
"the",
"entity",
".",
"Allowed",
"to",
"the",
"ones",
"who",
"can",
"create",
"the",
"associated",
"entity",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-jenkins/src/main/java/net/nemerosa/ontrack/extension/jenkins/JenkinsBuildPropertyType.java#L52-L64 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/Application.java | Application.main | public static void main(String[] args) {
// PID file
File pid = new File("ontrack.pid");
// Runs the application
SpringApplication application = new SpringApplication(Application.class);
application.addListeners(new ApplicationPidFileWriter(pid));
application.run(args);... | java | public static void main(String[] args) {
// PID file
File pid = new File("ontrack.pid");
// Runs the application
SpringApplication application = new SpringApplication(Application.class);
application.addListeners(new ApplicationPidFileWriter(pid));
application.run(args);... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"// PID file",
"File",
"pid",
"=",
"new",
"File",
"(",
"\"ontrack.pid\"",
")",
";",
"// Runs the application",
"SpringApplication",
"application",
"=",
"new",
"SpringApplication",
"("... | Start-up point
@param args Arguments passed to the program, they may contain configuration variables. | [
"Start",
"-",
"up",
"point"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/Application.java#L17-L26 | train |
nemerosa/ontrack | ontrack-model/src/main/java/net/nemerosa/ontrack/model/structure/ValidationStampRunView.java | ValidationStampRunView.hasValidationStamp | public boolean hasValidationStamp(String name, String status) {
return (StringUtils.equals(name, getValidationStamp().getName()))
&& isRun()
&& (
StringUtils.isBlank(status)
|| StringUtils.equals(status, getLastStatus().getStatusID().getId(... | java | public boolean hasValidationStamp(String name, String status) {
return (StringUtils.equals(name, getValidationStamp().getName()))
&& isRun()
&& (
StringUtils.isBlank(status)
|| StringUtils.equals(status, getLastStatus().getStatusID().getId(... | [
"public",
"boolean",
"hasValidationStamp",
"(",
"String",
"name",
",",
"String",
"status",
")",
"{",
"return",
"(",
"StringUtils",
".",
"equals",
"(",
"name",
",",
"getValidationStamp",
"(",
")",
".",
"getName",
"(",
")",
")",
")",
"&&",
"isRun",
"(",
")... | Checks if the validation run view has the given validation stamp with the given status. | [
"Checks",
"if",
"the",
"validation",
"run",
"view",
"has",
"the",
"given",
"validation",
"stamp",
"with",
"the",
"given",
"status",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-model/src/main/java/net/nemerosa/ontrack/model/structure/ValidationStampRunView.java#L52-L59 | train |
nemerosa/ontrack | ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/service/SVNSyncServiceImpl.java | SVNSyncServiceImpl.getSVNConfiguredBranches | protected Stream<Branch> getSVNConfiguredBranches() {
return structureService.getProjectList()
.stream()
// ...which have a SVN configuration
.filter(project -> propertyService.hasProperty(project, SVNProjectConfigurationPropertyType.class))
// ...... | java | protected Stream<Branch> getSVNConfiguredBranches() {
return structureService.getProjectList()
.stream()
// ...which have a SVN configuration
.filter(project -> propertyService.hasProperty(project, SVNProjectConfigurationPropertyType.class))
// ...... | [
"protected",
"Stream",
"<",
"Branch",
">",
"getSVNConfiguredBranches",
"(",
")",
"{",
"return",
"structureService",
".",
"getProjectList",
"(",
")",
".",
"stream",
"(",
")",
"// ...which have a SVN configuration",
".",
"filter",
"(",
"project",
"->",
"propertyServic... | Gets the list of all branches, for all projects, which are properly configured for SVN. | [
"Gets",
"the",
"list",
"of",
"all",
"branches",
"for",
"all",
"projects",
"which",
"are",
"properly",
"configured",
"for",
"SVN",
"."
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-svn/src/main/java/net/nemerosa/ontrack/extension/svn/service/SVNSyncServiceImpl.java#L267-L276 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PermissionController.java | PermissionController.getGlobalPermissions | @RequestMapping(value = "globals", method = RequestMethod.GET)
public Resources<GlobalPermission> getGlobalPermissions() {
return Resources.of(
accountService.getGlobalPermissions(),
uri(on(PermissionController.class).getGlobalPermissions())
).with("_globalRoles", uri... | java | @RequestMapping(value = "globals", method = RequestMethod.GET)
public Resources<GlobalPermission> getGlobalPermissions() {
return Resources.of(
accountService.getGlobalPermissions(),
uri(on(PermissionController.class).getGlobalPermissions())
).with("_globalRoles", uri... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"globals\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"GlobalPermission",
">",
"getGlobalPermissions",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"(",
"accountService",
... | List of global permissions | [
"List",
"of",
"global",
"permissions"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PermissionController.java#L40-L46 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PermissionController.java | PermissionController.getGlobalRoles | @RequestMapping(value = "globals/roles", method = RequestMethod.GET)
public Resources<GlobalRole> getGlobalRoles() {
return Resources.of(
rolesService.getGlobalRoles(),
uri(on(PermissionController.class).getGlobalRoles())
);
} | java | @RequestMapping(value = "globals/roles", method = RequestMethod.GET)
public Resources<GlobalRole> getGlobalRoles() {
return Resources.of(
rolesService.getGlobalRoles(),
uri(on(PermissionController.class).getGlobalRoles())
);
} | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"globals/roles\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"GlobalRole",
">",
"getGlobalRoles",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"(",
"rolesService",
".",
"... | List of global roles | [
"List",
"of",
"global",
"roles"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PermissionController.java#L51-L57 | train |
nemerosa/ontrack | ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PermissionController.java | PermissionController.getProjectRoles | @RequestMapping(value = "projects/roles", method = RequestMethod.GET)
public Resources<ProjectRole> getProjectRoles() {
return Resources.of(
rolesService.getProjectRoles(),
uri(on(PermissionController.class).getProjectRoles())
);
} | java | @RequestMapping(value = "projects/roles", method = RequestMethod.GET)
public Resources<ProjectRole> getProjectRoles() {
return Resources.of(
rolesService.getProjectRoles(),
uri(on(PermissionController.class).getProjectRoles())
);
} | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"projects/roles\"",
",",
"method",
"=",
"RequestMethod",
".",
"GET",
")",
"public",
"Resources",
"<",
"ProjectRole",
">",
"getProjectRoles",
"(",
")",
"{",
"return",
"Resources",
".",
"of",
"(",
"rolesService",
".",
... | List of project roles | [
"List",
"of",
"project",
"roles"
] | 37b0874cbf387b58aba95cd3c1bc3b15e11bc913 | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/PermissionController.java#L78-L84 | train |
alexnederlof/Jasper-report-maven-plugin | src/main/java/com/alexnederlof/jasperreport/JasperReporter.java | JasperReporter.jrxmlFilesToCompile | protected Set<File> jrxmlFilesToCompile(SourceMapping mapping) throws MojoExecutionException {
if (!sourceDirectory.isDirectory()) {
String message = sourceDirectory.getName() + " is not a directory";
if (failOnMissingSourceDirectory) {
throw new IllegalArgumentException(message);
}
else {
log.war... | java | protected Set<File> jrxmlFilesToCompile(SourceMapping mapping) throws MojoExecutionException {
if (!sourceDirectory.isDirectory()) {
String message = sourceDirectory.getName() + " is not a directory";
if (failOnMissingSourceDirectory) {
throw new IllegalArgumentException(message);
}
else {
log.war... | [
"protected",
"Set",
"<",
"File",
">",
"jrxmlFilesToCompile",
"(",
"SourceMapping",
"mapping",
")",
"throws",
"MojoExecutionException",
"{",
"if",
"(",
"!",
"sourceDirectory",
".",
"isDirectory",
"(",
")",
")",
"{",
"String",
"message",
"=",
"sourceDirectory",
".... | Determines source files to be compiled.
@param mapping The source files
@return set of jxml files to compile
@throws MojoExecutionException When there's trouble with the input | [
"Determines",
"source",
"files",
"to",
"be",
"compiled",
"."
] | 481c50c6db360ec71693034b6b9a2c1eb63277d8 | https://github.com/alexnederlof/Jasper-report-maven-plugin/blob/481c50c6db360ec71693034b6b9a2c1eb63277d8/src/main/java/com/alexnederlof/jasperreport/JasperReporter.java#L229-L249 | train |
alexnederlof/Jasper-report-maven-plugin | src/main/java/com/alexnederlof/jasperreport/JasperReporter.java | JasperReporter.checkOutDirWritable | private void checkOutDirWritable(File outputDirectory) throws MojoExecutionException {
if (!outputDirectory.exists()) {
checkIfOutputCanBeCreated();
checkIfOutputDirIsWritable();
if (verbose) {
log.info("Output dir check OK");
}
}
else if (!outputDirectory.canWrite()) {
throw new MojoExecutionE... | java | private void checkOutDirWritable(File outputDirectory) throws MojoExecutionException {
if (!outputDirectory.exists()) {
checkIfOutputCanBeCreated();
checkIfOutputDirIsWritable();
if (verbose) {
log.info("Output dir check OK");
}
}
else if (!outputDirectory.canWrite()) {
throw new MojoExecutionE... | [
"private",
"void",
"checkOutDirWritable",
"(",
"File",
"outputDirectory",
")",
"throws",
"MojoExecutionException",
"{",
"if",
"(",
"!",
"outputDirectory",
".",
"exists",
"(",
")",
")",
"{",
"checkIfOutputCanBeCreated",
"(",
")",
";",
"checkIfOutputDirIsWritable",
"(... | Check if the output directory exist and is writable. If not, try to
create an output dir and see if that is writable.
@param outputDirectory The dir where the result will be placed
@throws MojoExecutionException When the output directory is not writable | [
"Check",
"if",
"the",
"output",
"directory",
"exist",
"and",
"is",
"writable",
".",
"If",
"not",
"try",
"to",
"create",
"an",
"output",
"dir",
"and",
"see",
"if",
"that",
"is",
"writable",
"."
] | 481c50c6db360ec71693034b6b9a2c1eb63277d8 | https://github.com/alexnederlof/Jasper-report-maven-plugin/blob/481c50c6db360ec71693034b6b9a2c1eb63277d8/src/main/java/com/alexnederlof/jasperreport/JasperReporter.java#L274-L287 | train |
alexnederlof/Jasper-report-maven-plugin | src/main/java/com/alexnederlof/jasperreport/CompileTask.java | CompileTask.call | @Override
public Void call() throws Exception {
OutputStream out = null;
InputStream in = null;
try {
out = new FileOutputStream(destination);
in = new FileInputStream(source);
JasperCompileManager.compileReportToStream(in, out);
if (verbose) {... | java | @Override
public Void call() throws Exception {
OutputStream out = null;
InputStream in = null;
try {
out = new FileOutputStream(destination);
in = new FileInputStream(source);
JasperCompileManager.compileReportToStream(in, out);
if (verbose) {... | [
"@",
"Override",
"public",
"Void",
"call",
"(",
")",
"throws",
"Exception",
"{",
"OutputStream",
"out",
"=",
"null",
";",
"InputStream",
"in",
"=",
"null",
";",
"try",
"{",
"out",
"=",
"new",
"FileOutputStream",
"(",
"destination",
")",
";",
"in",
"=",
... | Compile the source file. If the source file doesn't have the right
extension, it is skipped.
@return Debug output of the compile action.
@throws Exception when anything goes wrong while compiling. | [
"Compile",
"the",
"source",
"file",
".",
"If",
"the",
"source",
"file",
"doesn",
"t",
"have",
"the",
"right",
"extension",
"it",
"is",
"skipped",
"."
] | 481c50c6db360ec71693034b6b9a2c1eb63277d8 | https://github.com/alexnederlof/Jasper-report-maven-plugin/blob/481c50c6db360ec71693034b6b9a2c1eb63277d8/src/main/java/com/alexnederlof/jasperreport/CompileTask.java#L56-L78 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/compat/view/SurfaceControlCompatUtils.java | SurfaceControlCompatUtils.screenshot | public static Bitmap screenshot(int width, int height) {
if (METHOD_screenshot_II == null) {
Log.e(TAG, "screenshot method was not found.");
return null;
}
return (Bitmap) CompatUtils.invoke(null, null, METHOD_screenshot_II, width, height);
} | java | public static Bitmap screenshot(int width, int height) {
if (METHOD_screenshot_II == null) {
Log.e(TAG, "screenshot method was not found.");
return null;
}
return (Bitmap) CompatUtils.invoke(null, null, METHOD_screenshot_II, width, height);
} | [
"public",
"static",
"Bitmap",
"screenshot",
"(",
"int",
"width",
",",
"int",
"height",
")",
"{",
"if",
"(",
"METHOD_screenshot_II",
"==",
"null",
")",
"{",
"Log",
".",
"e",
"(",
"TAG",
",",
"\"screenshot method was not found.\"",
")",
";",
"return",
"null",
... | Copy the current screen contents into a bitmap and return it. Use width =
0 and height = 0 to obtain an unscaled screenshot.
@param width The desired width of the returned bitmap; the raw screen
will be scaled down to this size.
@param height The desired height of the returned bitmap; the raw screen
will be scaled dow... | [
"Copy",
"the",
"current",
"screen",
"contents",
"into",
"a",
"bitmap",
"and",
"return",
"it",
".",
"Use",
"width",
"=",
"0",
"and",
"height",
"=",
"0",
"to",
"obtain",
"an",
"unscaled",
"screenshot",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/compat/view/SurfaceControlCompatUtils.java#L52-L59 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/ScreenshotUtils.java | ScreenshotUtils.createScreenshot | public static Bitmap createScreenshot(Context context) {
if (!hasScreenshotPermission(context)) {
LogUtils.log(ScreenshotUtils.class, Log.ERROR, "Screenshot permission denied.");
return null;
}
final WindowManager windowManager =
(WindowManager) context.g... | java | public static Bitmap createScreenshot(Context context) {
if (!hasScreenshotPermission(context)) {
LogUtils.log(ScreenshotUtils.class, Log.ERROR, "Screenshot permission denied.");
return null;
}
final WindowManager windowManager =
(WindowManager) context.g... | [
"public",
"static",
"Bitmap",
"createScreenshot",
"(",
"Context",
"context",
")",
"{",
"if",
"(",
"!",
"hasScreenshotPermission",
"(",
"context",
")",
")",
"{",
"LogUtils",
".",
"log",
"(",
"ScreenshotUtils",
".",
"class",
",",
"Log",
".",
"ERROR",
",",
"\... | Returns a screenshot with the contents of the current display that
matches the current display rotation.
@param context The current context.
@return A bitmap of the screenshot. | [
"Returns",
"a",
"screenshot",
"with",
"the",
"contents",
"of",
"the",
"current",
"display",
"that",
"matches",
"the",
"current",
"display",
"rotation",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/ScreenshotUtils.java#L59-L117 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoRef.java | AccessibilityNodeInfoRef.reset | public void reset(AccessibilityNodeInfoCompat newNode) {
if (mNode != newNode && mNode != null && mOwned) {
mNode.recycle();
}
mNode = newNode;
mOwned = true;
} | java | public void reset(AccessibilityNodeInfoCompat newNode) {
if (mNode != newNode && mNode != null && mOwned) {
mNode.recycle();
}
mNode = newNode;
mOwned = true;
} | [
"public",
"void",
"reset",
"(",
"AccessibilityNodeInfoCompat",
"newNode",
")",
"{",
"if",
"(",
"mNode",
"!=",
"newNode",
"&&",
"mNode",
"!=",
"null",
"&&",
"mOwned",
")",
"{",
"mNode",
".",
"recycle",
"(",
")",
";",
"}",
"mNode",
"=",
"newNode",
";",
"... | Resets this object to contain a new node, taking ownership of the
new node. | [
"Resets",
"this",
"object",
"to",
"contain",
"a",
"new",
"node",
"taking",
"ownership",
"of",
"the",
"new",
"node",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoRef.java#L67-L73 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/ClassLoadingManager.java | ClassLoadingManager.init | public void init(Context context) {
if (!mNotFoundClassesMap.isEmpty()) {
buildInstalledPackagesCache(context);
}
mPackageMonitor.register(context);
} | java | public void init(Context context) {
if (!mNotFoundClassesMap.isEmpty()) {
buildInstalledPackagesCache(context);
}
mPackageMonitor.register(context);
} | [
"public",
"void",
"init",
"(",
"Context",
"context",
")",
"{",
"if",
"(",
"!",
"mNotFoundClassesMap",
".",
"isEmpty",
"(",
")",
")",
"{",
"buildInstalledPackagesCache",
"(",
"context",
")",
";",
"}",
"mPackageMonitor",
".",
"register",
"(",
"context",
")",
... | Builds the package cache and registers the package monitor
@param context The {@link Context} to use for monitor registration | [
"Builds",
"the",
"package",
"cache",
"and",
"registers",
"the",
"package",
"monitor"
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/ClassLoadingManager.java#L70-L76 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/ClassLoadingManager.java | ClassLoadingManager.buildInstalledPackagesCache | private void buildInstalledPackagesCache(Context context) {
final List<PackageInfo> installedPackages =
context.getPackageManager().getInstalledPackages(0);
for (PackageInfo installedPackage : installedPackages) {
addInstalledPackageToCache(installedPackage.packageName);
... | java | private void buildInstalledPackagesCache(Context context) {
final List<PackageInfo> installedPackages =
context.getPackageManager().getInstalledPackages(0);
for (PackageInfo installedPackage : installedPackages) {
addInstalledPackageToCache(installedPackage.packageName);
... | [
"private",
"void",
"buildInstalledPackagesCache",
"(",
"Context",
"context",
")",
"{",
"final",
"List",
"<",
"PackageInfo",
">",
"installedPackages",
"=",
"context",
".",
"getPackageManager",
"(",
")",
".",
"getInstalledPackages",
"(",
"0",
")",
";",
"for",
"(",... | Builds a cache of installed packages. | [
"Builds",
"a",
"cache",
"of",
"installed",
"packages",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/ClassLoadingManager.java#L89-L96 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/ContrastSwatch.java | ContrastSwatch.processSwatch | private void processSwatch(Bitmap image) {
final Map<Integer, Integer> colorHistogram = processLuminanceData(image);
extractFgBgData(colorHistogram);
// Two-decimal digits of precision for the contrast ratio
mContrastRatio = Math.round(
ContrastUtils.calculateContrastRat... | java | private void processSwatch(Bitmap image) {
final Map<Integer, Integer> colorHistogram = processLuminanceData(image);
extractFgBgData(colorHistogram);
// Two-decimal digits of precision for the contrast ratio
mContrastRatio = Math.round(
ContrastUtils.calculateContrastRat... | [
"private",
"void",
"processSwatch",
"(",
"Bitmap",
"image",
")",
"{",
"final",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"colorHistogram",
"=",
"processLuminanceData",
"(",
"image",
")",
";",
"extractFgBgData",
"(",
"colorHistogram",
")",
";",
"// Two-decimal ... | Compute the background and foreground colors and luminance for the image, and the contrast
ratio. | [
"Compute",
"the",
"background",
"and",
"foreground",
"colors",
"and",
"luminance",
"for",
"the",
"image",
"and",
"the",
"contrast",
"ratio",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/ContrastSwatch.java#L96-L104 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/ContrastSwatch.java | ContrastSwatch.extractFgBgData | private void extractFgBgData(Map<Integer, Integer> colorHistogram) {
if (colorHistogram.isEmpty()) {
// An empty histogram indicates we've encountered a 0px area image. It has no luminance.
mBackgroundLuminance = mForegroundLuminance = 0;
mBackgroundColor = Color.BLACK;
... | java | private void extractFgBgData(Map<Integer, Integer> colorHistogram) {
if (colorHistogram.isEmpty()) {
// An empty histogram indicates we've encountered a 0px area image. It has no luminance.
mBackgroundLuminance = mForegroundLuminance = 0;
mBackgroundColor = Color.BLACK;
... | [
"private",
"void",
"extractFgBgData",
"(",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"colorHistogram",
")",
"{",
"if",
"(",
"colorHistogram",
".",
"isEmpty",
"(",
")",
")",
"{",
"// An empty histogram indicates we've encountered a 0px area image. It has no luminance.",
... | Set the fields mBackgroundColor, mForegroundColor, mBackgroundLuminance and
mForegroundLuminance based upon the color histogram. | [
"Set",
"the",
"fields",
"mBackgroundColor",
"mForegroundColor",
"mBackgroundLuminance",
"and",
"mForegroundLuminance",
"based",
"upon",
"the",
"color",
"histogram",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/ContrastSwatch.java#L144-L206 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/NodeFocusFinder.java | NodeFocusFinder.focusSearch | public static AccessibilityNodeInfoCompat focusSearch(
AccessibilityNodeInfoCompat node, int direction) {
final AccessibilityNodeInfoRef ref = AccessibilityNodeInfoRef.unOwned(node);
switch (direction) {
case SEARCH_FORWARD: {
if (!ref.nextInOrder()) {
... | java | public static AccessibilityNodeInfoCompat focusSearch(
AccessibilityNodeInfoCompat node, int direction) {
final AccessibilityNodeInfoRef ref = AccessibilityNodeInfoRef.unOwned(node);
switch (direction) {
case SEARCH_FORWARD: {
if (!ref.nextInOrder()) {
... | [
"public",
"static",
"AccessibilityNodeInfoCompat",
"focusSearch",
"(",
"AccessibilityNodeInfoCompat",
"node",
",",
"int",
"direction",
")",
"{",
"final",
"AccessibilityNodeInfoRef",
"ref",
"=",
"AccessibilityNodeInfoRef",
".",
"unOwned",
"(",
"node",
")",
";",
"switch",... | Perform in-order navigation from a given node in a particular direction.
@param node The starting node.
@param direction The direction to travel.
@return The next node in the specified direction, or {@code null} if
there are no more nodes. | [
"Perform",
"in",
"-",
"order",
"navigation",
"from",
"a",
"given",
"node",
"in",
"a",
"particular",
"direction",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/NodeFocusFinder.java#L33-L53 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/WebInterfaceUtils.java | WebInterfaceUtils.performNavigationByDOMObject | public static boolean performNavigationByDOMObject(
AccessibilityNodeInfoCompat node, int direction) {
final int action = (direction == DIRECTION_FORWARD)
? AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT
: AccessibilityNodeInfoCompat.ACTION_PREVIOUS_HTML_ELEMENT... | java | public static boolean performNavigationByDOMObject(
AccessibilityNodeInfoCompat node, int direction) {
final int action = (direction == DIRECTION_FORWARD)
? AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT
: AccessibilityNodeInfoCompat.ACTION_PREVIOUS_HTML_ELEMENT... | [
"public",
"static",
"boolean",
"performNavigationByDOMObject",
"(",
"AccessibilityNodeInfoCompat",
"node",
",",
"int",
"direction",
")",
"{",
"final",
"int",
"action",
"=",
"(",
"direction",
"==",
"DIRECTION_FORWARD",
")",
"?",
"AccessibilityNodeInfoCompat",
".",
"ACT... | Sends an instruction to ChromeVox to navigate by DOM object in
the given direction within a node.
@param node The node containing web content with ChromeVox to which the
message should be sent
@param direction {@link #DIRECTION_FORWARD} or
{@link #DIRECTION_BACKWARD}
@return {@code true} if the action was performed, {... | [
"Sends",
"an",
"instruction",
"to",
"ChromeVox",
"to",
"navigate",
"by",
"DOM",
"object",
"in",
"the",
"given",
"direction",
"within",
"a",
"node",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/WebInterfaceUtils.java#L155-L161 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/WebInterfaceUtils.java | WebInterfaceUtils.supportsWebActions | public static boolean supportsWebActions(AccessibilityNodeInfoCompat node) {
return AccessibilityNodeInfoUtils.supportsAnyAction(node,
AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT,
AccessibilityNodeInfoCompat.ACTION_PREVIOUS_HTML_ELEMENT);
} | java | public static boolean supportsWebActions(AccessibilityNodeInfoCompat node) {
return AccessibilityNodeInfoUtils.supportsAnyAction(node,
AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT,
AccessibilityNodeInfoCompat.ACTION_PREVIOUS_HTML_ELEMENT);
} | [
"public",
"static",
"boolean",
"supportsWebActions",
"(",
"AccessibilityNodeInfoCompat",
"node",
")",
"{",
"return",
"AccessibilityNodeInfoUtils",
".",
"supportsAnyAction",
"(",
"node",
",",
"AccessibilityNodeInfoCompat",
".",
"ACTION_NEXT_HTML_ELEMENT",
",",
"AccessibilityNo... | Determines whether or not the given node contains web content.
@param node The node to evaluate
@return {@code true} if the node contains web content, {@code false} otherwise | [
"Determines",
"whether",
"or",
"not",
"the",
"given",
"node",
"contains",
"web",
"content",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/WebInterfaceUtils.java#L263-L267 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/WebInterfaceUtils.java | WebInterfaceUtils.hasLegacyWebContent | public static boolean hasLegacyWebContent(AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
if (!supportsWebActions(node)) {
return false;
}
// ChromeVox does not have sub elements, so if the parent element also has web content
... | java | public static boolean hasLegacyWebContent(AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
if (!supportsWebActions(node)) {
return false;
}
// ChromeVox does not have sub elements, so if the parent element also has web content
... | [
"public",
"static",
"boolean",
"hasLegacyWebContent",
"(",
"AccessibilityNodeInfoCompat",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"supportsWebActions",
"(",
"node",
")",
")",
"{",
"return",
... | Determines whether or not the given node contains ChromeVox content.
@param node The node to evaluate
@return {@code true} if the node contains ChromeVox content, {@code false} otherwise | [
"Determines",
"whether",
"or",
"not",
"the",
"given",
"node",
"contains",
"ChromeVox",
"content",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/WebInterfaceUtils.java#L308-L334 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.shouldFocusNode | public static boolean shouldFocusNode(Context context, AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
if (!isVisibleOrLegacy(node)) {
LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE,
"Don't focus, node is not visibl... | java | public static boolean shouldFocusNode(Context context, AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
if (!isVisibleOrLegacy(node)) {
LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE,
"Don't focus, node is not visibl... | [
"public",
"static",
"boolean",
"shouldFocusNode",
"(",
"Context",
"context",
",",
"AccessibilityNodeInfoCompat",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"isVisibleOrLegacy",
"(",
"node",
")",
... | Returns whether a node should receive accessibility focus from
navigation. This method should never be called recursively, since it
traverses up the parent hierarchy on every call.
@see #findFocusFromHover(Context, AccessibilityNodeInfoCompat) | [
"Returns",
"whether",
"a",
"node",
"should",
"receive",
"accessibility",
"focus",
"from",
"navigation",
".",
"This",
"method",
"should",
"never",
"be",
"called",
"recursively",
"since",
"it",
"traverses",
"up",
"the",
"parent",
"hierarchy",
"on",
"every",
"call"... | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L169-L210 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.hasMatchingAncestor | private static boolean hasMatchingAncestor(
Context context, AccessibilityNodeInfoCompat node, NodeFilter filter) {
if (node == null) {
return false;
}
final AccessibilityNodeInfoCompat result = getMatchingAncestor(context, node, filter);
if (result == null) {
... | java | private static boolean hasMatchingAncestor(
Context context, AccessibilityNodeInfoCompat node, NodeFilter filter) {
if (node == null) {
return false;
}
final AccessibilityNodeInfoCompat result = getMatchingAncestor(context, node, filter);
if (result == null) {
... | [
"private",
"static",
"boolean",
"hasMatchingAncestor",
"(",
"Context",
"context",
",",
"AccessibilityNodeInfoCompat",
"node",
",",
"NodeFilter",
"filter",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"final",
"AccessibilityNo... | Check whether a given node has a scrollable ancestor.
@param node The node to examine.
@return {@code true} if one of the node's ancestors is scrollable. | [
"Check",
"whether",
"a",
"given",
"node",
"has",
"a",
"scrollable",
"ancestor",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L405-L418 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.isScrollable | private static boolean isScrollable(AccessibilityNodeInfoCompat node) {
if (node.isScrollable()) {
return true;
}
return supportsAnyAction(node,
AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD,
AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
... | java | private static boolean isScrollable(AccessibilityNodeInfoCompat node) {
if (node.isScrollable()) {
return true;
}
return supportsAnyAction(node,
AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD,
AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
... | [
"private",
"static",
"boolean",
"isScrollable",
"(",
"AccessibilityNodeInfoCompat",
"node",
")",
"{",
"if",
"(",
"node",
".",
"isScrollable",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"supportsAnyAction",
"(",
"node",
",",
"AccessibilityNodeInfoC... | Check whether a given node is scrollable.
@param node The node to examine.
@return {@code true} if the node is scrollable. | [
"Check",
"whether",
"a",
"given",
"node",
"is",
"scrollable",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L481-L489 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.hasText | private static boolean hasText(AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
return (!TextUtils.isEmpty(node.getText())
|| !TextUtils.isEmpty(node.getContentDescription()));
} | java | private static boolean hasText(AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
return (!TextUtils.isEmpty(node.getText())
|| !TextUtils.isEmpty(node.getContentDescription()));
} | [
"private",
"static",
"boolean",
"hasText",
"(",
"AccessibilityNodeInfoCompat",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
"!",
"TextUtils",
".",
"isEmpty",
"(",
"node",
".",
"getText",
"(",
")... | Returns whether the specified node has text.
@param node The node to check.
@return {@code true} if the node has text. | [
"Returns",
"whether",
"the",
"specified",
"node",
"has",
"text",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L497-L504 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.isTopLevelScrollItem | public static boolean isTopLevelScrollItem(Context context, AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
AccessibilityNodeInfoCompat parent = null;
try {
parent = node.getParent();
if (parent == null) {
// N... | java | public static boolean isTopLevelScrollItem(Context context, AccessibilityNodeInfoCompat node) {
if (node == null) {
return false;
}
AccessibilityNodeInfoCompat parent = null;
try {
parent = node.getParent();
if (parent == null) {
// N... | [
"public",
"static",
"boolean",
"isTopLevelScrollItem",
"(",
"Context",
"context",
",",
"AccessibilityNodeInfoCompat",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"AccessibilityNodeInfoCompat",
"parent",
"=",
"null",
... | Determines whether a node is a top-level item in a scrollable container.
@param node The node to test.
@return {@code true} if {@code node} is a top-level item in a scrollable
container. | [
"Determines",
"whether",
"a",
"node",
"is",
"a",
"top",
"-",
"level",
"item",
"in",
"a",
"scrollable",
"container",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L513-L547 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.isEdgeListItem | public static boolean isEdgeListItem(
Context context, AccessibilityNodeInfoCompat node, int direction, NodeFilter filter) {
if (node == null) {
return false;
}
if ((direction <= 0) && isMatchingEdgeListItem(context, node,
NodeFocusFinder.SEARCH_BACKWARD,... | java | public static boolean isEdgeListItem(
Context context, AccessibilityNodeInfoCompat node, int direction, NodeFilter filter) {
if (node == null) {
return false;
}
if ((direction <= 0) && isMatchingEdgeListItem(context, node,
NodeFocusFinder.SEARCH_BACKWARD,... | [
"public",
"static",
"boolean",
"isEdgeListItem",
"(",
"Context",
"context",
",",
"AccessibilityNodeInfoCompat",
"node",
",",
"int",
"direction",
",",
"NodeFilter",
"filter",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"i... | Determines if the current item is at the edge of a list by checking the
scrollable predecessors of the items on either or both sides.
@param context The parent context.
@param node The node to check.
@param direction The direction in which to check, one of:
<ul>
<li>{@code -1} to check backward
<li>{@code 0} to check ... | [
"Determines",
"if",
"the",
"current",
"item",
"is",
"at",
"the",
"edge",
"of",
"a",
"list",
"by",
"checking",
"the",
"scrollable",
"predecessors",
"of",
"the",
"items",
"on",
"either",
"or",
"both",
"sides",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L576-L593 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.isMatchingEdgeListItem | private static boolean isMatchingEdgeListItem(Context context,
AccessibilityNodeInfoCompat cursor, int direction, NodeFilter filter) {
AccessibilityNodeInfoCompat ancestor = null;
AccessibilityNodeInfoCompat searched = null;
AccessibilityNodeInfoCompat searchedAncestor = null;
... | java | private static boolean isMatchingEdgeListItem(Context context,
AccessibilityNodeInfoCompat cursor, int direction, NodeFilter filter) {
AccessibilityNodeInfoCompat ancestor = null;
AccessibilityNodeInfoCompat searched = null;
AccessibilityNodeInfoCompat searchedAncestor = null;
... | [
"private",
"static",
"boolean",
"isMatchingEdgeListItem",
"(",
"Context",
"context",
",",
"AccessibilityNodeInfoCompat",
"cursor",
",",
"int",
"direction",
",",
"NodeFilter",
"filter",
")",
"{",
"AccessibilityNodeInfoCompat",
"ancestor",
"=",
"null",
";",
"Accessibility... | Utility method for determining if a searching past a particular node will
fall off the edge of a scrollable container.
@param cursor Node to check.
@param direction The direction in which to move from the cursor.
@param filter Filter used to validate list-type ancestors.
@return {@code true} if focusing search in the ... | [
"Utility",
"method",
"for",
"determining",
"if",
"a",
"searching",
"past",
"a",
"particular",
"node",
"will",
"fall",
"off",
"the",
"edge",
"of",
"a",
"scrollable",
"container",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L625-L663 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.searchFromBfs | public static AccessibilityNodeInfoCompat searchFromBfs(
Context context, AccessibilityNodeInfoCompat node, NodeFilter filter) {
if (node == null) {
return null;
}
final LinkedList<AccessibilityNodeInfoCompat> queue =
new LinkedList<AccessibilityNodeInfoC... | java | public static AccessibilityNodeInfoCompat searchFromBfs(
Context context, AccessibilityNodeInfoCompat node, NodeFilter filter) {
if (node == null) {
return null;
}
final LinkedList<AccessibilityNodeInfoCompat> queue =
new LinkedList<AccessibilityNodeInfoC... | [
"public",
"static",
"AccessibilityNodeInfoCompat",
"searchFromBfs",
"(",
"Context",
"context",
",",
"AccessibilityNodeInfoCompat",
"node",
",",
"NodeFilter",
"filter",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Lin... | Returns the result of applying a filter using breadth-first traversal.
@param context The parent context.
@param node The root node to traverse from.
@param filter The filter to satisfy.
@return The first node reached via BFS traversal that satisfies the
filter. | [
"Returns",
"the",
"result",
"of",
"applying",
"a",
"filter",
"using",
"breadth",
"-",
"first",
"traversal",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L813-L843 | train |
google/Accessibility-Test-Framework-for-Android | src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java | AccessibilityNodeInfoUtils.searchFromInOrderTraversal | public static AccessibilityNodeInfoCompat searchFromInOrderTraversal(
Context context, AccessibilityNodeInfoCompat root, NodeFilter filter, int direction) {
AccessibilityNodeInfoCompat currentNode = NodeFocusFinder.focusSearch(root, direction);
final HashSet<AccessibilityNodeInfoCompat> see... | java | public static AccessibilityNodeInfoCompat searchFromInOrderTraversal(
Context context, AccessibilityNodeInfoCompat root, NodeFilter filter, int direction) {
AccessibilityNodeInfoCompat currentNode = NodeFocusFinder.focusSearch(root, direction);
final HashSet<AccessibilityNodeInfoCompat> see... | [
"public",
"static",
"AccessibilityNodeInfoCompat",
"searchFromInOrderTraversal",
"(",
"Context",
"context",
",",
"AccessibilityNodeInfoCompat",
"root",
",",
"NodeFilter",
"filter",
",",
"int",
"direction",
")",
"{",
"AccessibilityNodeInfoCompat",
"currentNode",
"=",
"NodeFo... | Performs in-order traversal from a given node in a particular direction
until a node matching the specified filter is reached.
@param context The parent context.
@param root The root node to traverse from.
@param filter The filter to satisfy.
@return The first node reached via in-order traversal that satisfies the
fil... | [
"Performs",
"in",
"-",
"order",
"traversal",
"from",
"a",
"given",
"node",
"in",
"a",
"particular",
"direction",
"until",
"a",
"node",
"matching",
"the",
"specified",
"filter",
"is",
"reached",
"."
] | a6117fe0059c82dd764fa628d3817d724570f69e | https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/AccessibilityNodeInfoUtils.java#L899-L916 | train |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/version/internal/DefaultVersionRange.java | DefaultVersionRange.isCompatible | public boolean isCompatible(DefaultVersionRange otherRange)
{
int lowerCompare = compareTo(this.lowerBound, this.lowerBoundInclusive, otherRange.lowerBound,
otherRange.lowerBoundInclusive, false);
int upperCompare = compareTo(this.upperBound, this.upperBoundInclusive, otherRange.upperBou... | java | public boolean isCompatible(DefaultVersionRange otherRange)
{
int lowerCompare = compareTo(this.lowerBound, this.lowerBoundInclusive, otherRange.lowerBound,
otherRange.lowerBoundInclusive, false);
int upperCompare = compareTo(this.upperBound, this.upperBoundInclusive, otherRange.upperBou... | [
"public",
"boolean",
"isCompatible",
"(",
"DefaultVersionRange",
"otherRange",
")",
"{",
"int",
"lowerCompare",
"=",
"compareTo",
"(",
"this",
".",
"lowerBound",
",",
"this",
".",
"lowerBoundInclusive",
",",
"otherRange",
".",
"lowerBound",
",",
"otherRange",
".",... | Indicate if the provided version range is compatible with the provided version range.
@param otherRange the version range to compare
@return true if the two version ranges are compatibles, false otherwise | [
"Indicate",
"if",
"the",
"provided",
"version",
"range",
"is",
"compatible",
"with",
"the",
"provided",
"version",
"range",
"."
] | 5374d8c6d966588c1eac7392c83da610dfb9f129 | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/version/internal/DefaultVersionRange.java#L301-L329 | train |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/annotation/AbstractComponentDependencyFactory.java | AbstractComponentDependencyFactory.getGenericRole | @Deprecated
protected Class<?> getGenericRole(Field field)
{
Type type = field.getGenericType();
if (type instanceof ParameterizedType) {
ParameterizedType pType = (ParameterizedType) type;
Type[] types = pType.getActualTypeArguments();
if (types.length > 0 &... | java | @Deprecated
protected Class<?> getGenericRole(Field field)
{
Type type = field.getGenericType();
if (type instanceof ParameterizedType) {
ParameterizedType pType = (ParameterizedType) type;
Type[] types = pType.getActualTypeArguments();
if (types.length > 0 &... | [
"@",
"Deprecated",
"protected",
"Class",
"<",
"?",
">",
"getGenericRole",
"(",
"Field",
"field",
")",
"{",
"Type",
"type",
"=",
"field",
".",
"getGenericType",
"(",
")",
";",
"if",
"(",
"type",
"instanceof",
"ParameterizedType",
")",
"{",
"ParameterizedType"... | Extract generic type from the list field.
@param field the list field to inject
@return the role of the components in the list
@since 4.0M1 it's useless | [
"Extract",
"generic",
"type",
"from",
"the",
"list",
"field",
"."
] | 5374d8c6d966588c1eac7392c83da610dfb9f129 | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/annotation/AbstractComponentDependencyFactory.java#L54-L68 | train |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/local/DefaultLocalExtensionRepository.java | DefaultLocalExtensionRepository.createExtension | private DefaultLocalExtension createExtension(Extension extension)
{
DefaultLocalExtension localExtension = new DefaultLocalExtension(this, extension);
localExtension.setFile(this.storage.getNewExtensionFile(localExtension.getId(), localExtension.getType()));
return localExtension;
} | java | private DefaultLocalExtension createExtension(Extension extension)
{
DefaultLocalExtension localExtension = new DefaultLocalExtension(this, extension);
localExtension.setFile(this.storage.getNewExtensionFile(localExtension.getId(), localExtension.getType()));
return localExtension;
} | [
"private",
"DefaultLocalExtension",
"createExtension",
"(",
"Extension",
"extension",
")",
"{",
"DefaultLocalExtension",
"localExtension",
"=",
"new",
"DefaultLocalExtension",
"(",
"this",
",",
"extension",
")",
";",
"localExtension",
".",
"setFile",
"(",
"this",
".",... | Create a new local extension from a remote extension.
@param extension the extension to copy
@return the new local extension | [
"Create",
"a",
"new",
"local",
"extension",
"from",
"a",
"remote",
"extension",
"."
] | 5374d8c6d966588c1eac7392c83da610dfb9f129 | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/local/DefaultLocalExtensionRepository.java#L151-L158 | train |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/job/internal/AbstractInstallPlanJob.java | AbstractInstallPlanJob.getDependency | private ExtensionDependency getDependency(Extension extension, String dependencyId)
{
for (ExtensionDependency dependency : extension.getDependencies()) {
if (dependency.getId().equals(dependencyId)) {
return dependency;
}
}
return null;
} | java | private ExtensionDependency getDependency(Extension extension, String dependencyId)
{
for (ExtensionDependency dependency : extension.getDependencies()) {
if (dependency.getId().equals(dependencyId)) {
return dependency;
}
}
return null;
} | [
"private",
"ExtensionDependency",
"getDependency",
"(",
"Extension",
"extension",
",",
"String",
"dependencyId",
")",
"{",
"for",
"(",
"ExtensionDependency",
"dependency",
":",
"extension",
".",
"getDependencies",
"(",
")",
")",
"{",
"if",
"(",
"dependency",
".",
... | Extract extension with the provided id from the provided extension.
@param extension the extension
@param dependencyId the id of the dependency
@return the extension dependency or null if none has been found | [
"Extract",
"extension",
"with",
"the",
"provided",
"id",
"from",
"the",
"provided",
"extension",
"."
] | 5374d8c6d966588c1eac7392c83da610dfb9f129 | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/job/internal/AbstractInstallPlanJob.java#L728-L737 | train |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/job/internal/AbstractInstallPlanJob.java | AbstractInstallPlanJob.getReplacedInstalledExtensions | private Set<InstalledExtension> getReplacedInstalledExtensions(Extension extension, String namespace)
throws IncompatibleVersionConstraintException, ResolveException, InstallException
{
// If a namespace extension already exist on root, fail the install
if (namespace != null) {
c... | java | private Set<InstalledExtension> getReplacedInstalledExtensions(Extension extension, String namespace)
throws IncompatibleVersionConstraintException, ResolveException, InstallException
{
// If a namespace extension already exist on root, fail the install
if (namespace != null) {
c... | [
"private",
"Set",
"<",
"InstalledExtension",
">",
"getReplacedInstalledExtensions",
"(",
"Extension",
"extension",
",",
"String",
"namespace",
")",
"throws",
"IncompatibleVersionConstraintException",
",",
"ResolveException",
",",
"InstallException",
"{",
"// If a namespace ex... | Search and validate existing extensions that will be replaced by the extension. | [
"Search",
"and",
"validate",
"existing",
"extensions",
"that",
"will",
"be",
"replaced",
"by",
"the",
"extension",
"."
] | 5374d8c6d966588c1eac7392c83da610dfb9f129 | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/job/internal/AbstractInstallPlanJob.java#L1120-L1155 | train |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-pkix/src/main/java/org/xwiki/crypto/signer/internal/cms/BcCMSUtils.java | BcCMSUtils.verify | public static boolean verify(SignerInformation signer,
CertifiedPublicKey certKey, BcContentVerifierProviderBuilder contentVerifierProviderBuilder,
DigestFactory digestProvider) throws CMSException
{
if (certKey == null) {
throw new CMSException("No certified key for proceeding t... | java | public static boolean verify(SignerInformation signer,
CertifiedPublicKey certKey, BcContentVerifierProviderBuilder contentVerifierProviderBuilder,
DigestFactory digestProvider) throws CMSException
{
if (certKey == null) {
throw new CMSException("No certified key for proceeding t... | [
"public",
"static",
"boolean",
"verify",
"(",
"SignerInformation",
"signer",
",",
"CertifiedPublicKey",
"certKey",
",",
"BcContentVerifierProviderBuilder",
"contentVerifierProviderBuilder",
",",
"DigestFactory",
"digestProvider",
")",
"throws",
"CMSException",
"{",
"if",
"(... | Verify a CMS signature.
@param signer the signer to verify.
@param certKey the certified public key of the signer.
@param contentVerifierProviderBuilder a builder of content provider.
@param digestProvider a digest provider.
@return true if the signature is verified and the certificate was valid at the time of signatu... | [
"Verify",
"a",
"CMS",
"signature",
"."
] | 5374d8c6d966588c1eac7392c83da610dfb9f129 | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-pkix/src/main/java/org/xwiki/crypto/signer/internal/cms/BcCMSUtils.java#L62-L76 | train |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/AbstractExtensionDependency.java | AbstractExtensionDependency.setProperties | public void setProperties(Map<String, Object> properties)
{
this.properties.clear();
this.properties.putAll(properties);
} | java | public void setProperties(Map<String, Object> properties)
{
this.properties.clear();
this.properties.putAll(properties);
} | [
"public",
"void",
"setProperties",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"this",
".",
"properties",
".",
"clear",
"(",
")",
";",
"this",
".",
"properties",
".",
"putAll",
"(",
"properties",
")",
";",
"}"
] | Replace existing properties with provided properties.
@param properties the properties | [
"Replace",
"existing",
"properties",
"with",
"provided",
"properties",
"."
] | 5374d8c6d966588c1eac7392c83da610dfb9f129 | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/AbstractExtensionDependency.java#L258-L262 | train |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/src/main/java/org/xwiki/cache/internal/DefaultCacheManager.java | DefaultCacheManager.createNewCache | public <T> Cache<T> createNewCache(CacheConfiguration config, String cacheHint) throws CacheException
{
CacheFactory cacheFactory;
try {
cacheFactory = this.componentManager.getInstance(CacheFactory.class, cacheHint);
} catch (ComponentLookupException e) {
throw new C... | java | public <T> Cache<T> createNewCache(CacheConfiguration config, String cacheHint) throws CacheException
{
CacheFactory cacheFactory;
try {
cacheFactory = this.componentManager.getInstance(CacheFactory.class, cacheHint);
} catch (ComponentLookupException e) {
throw new C... | [
"public",
"<",
"T",
">",
"Cache",
"<",
"T",
">",
"createNewCache",
"(",
"CacheConfiguration",
"config",
",",
"String",
"cacheHint",
")",
"throws",
"CacheException",
"{",
"CacheFactory",
"cacheFactory",
";",
"try",
"{",
"cacheFactory",
"=",
"this",
".",
"compon... | Lookup the cache component with provided hint and create a new cache.
@param <T> the class of the data stored in the cache.
@param config the cache configuration.
@param cacheHint the role hint to lookup.
@return a new {@link Cache}.
@throws CacheException error when creating the cache. | [
"Lookup",
"the",
"cache",
"component",
"with",
"provided",
"hint",
"and",
"create",
"a",
"new",
"cache",
"."
] | 5374d8c6d966588c1eac7392c83da610dfb9f129 | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/src/main/java/org/xwiki/cache/internal/DefaultCacheManager.java#L103-L113 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.