id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
64,800
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.findUsers
public List<User> findUsers(String emailOrUsername) throws GitLabApiException { return (findUsers(emailOrUsername, getDefaultPerPage()).all()); }
java
public List<User> findUsers(String emailOrUsername) throws GitLabApiException { return (findUsers(emailOrUsername, getDefaultPerPage()).all()); }
[ "public", "List", "<", "User", ">", "findUsers", "(", "String", "emailOrUsername", ")", "throws", "GitLabApiException", "{", "return", "(", "findUsers", "(", "emailOrUsername", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ]
Search users by Email or username <pre><code>GitLab Endpoint: GET /users?search=:email_or_username</code></pre> @param emailOrUsername the email or username to search for @return the User List with the email or username like emailOrUsername @throws GitLabApiException if any exception occurs
[ "Search", "users", "by", "Email", "or", "username" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L329-L331
64,801
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.findUsers
public Pager<User> findUsers(String emailOrUsername, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = createGitLabApiForm().withParam("search", emailOrUsername, true); return (new Pager<User>(this, User.class, itemsPerPage, formData.asMap(), "users")); }
java
public Pager<User> findUsers(String emailOrUsername, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = createGitLabApiForm().withParam("search", emailOrUsername, true); return (new Pager<User>(this, User.class, itemsPerPage, formData.asMap(), "users")); }
[ "public", "Pager", "<", "User", ">", "findUsers", "(", "String", "emailOrUsername", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "createGitLabApiForm", "(", ")", ".", "withParam", "(", "\"search\"", ",", ...
Search users by Email or username and return a Pager <pre><code>GitLab Endpoint: GET /users?search=:email_or_username</code></pre> @param emailOrUsername the email or username to search for @param itemsPerPage the number of Project instances that will be fetched per page @return the User Pager with the email or us...
[ "Search", "users", "by", "Email", "or", "username", "and", "return", "a", "Pager" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L364-L367
64,802
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.findUsersStream
public Stream<User> findUsersStream(String emailOrUsername) throws GitLabApiException { return (findUsers(emailOrUsername, getDefaultPerPage()).stream()); }
java
public Stream<User> findUsersStream(String emailOrUsername) throws GitLabApiException { return (findUsers(emailOrUsername, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "User", ">", "findUsersStream", "(", "String", "emailOrUsername", ")", "throws", "GitLabApiException", "{", "return", "(", "findUsers", "(", "emailOrUsername", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ";",...
Search users by Email or username. <pre><code>GitLab Endpoint: GET /users?search=:email_or_username</code></pre> @param emailOrUsername the email or username to search for @return a Stream of User instances with the email or username like emailOrUsername @throws GitLabApiException if any exception occurs
[ "Search", "users", "by", "Email", "or", "username", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L378-L380
64,803
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.modifyUser
@Deprecated public User modifyUser(User user, CharSequence password, Integer projectsLimit) throws GitLabApiException { Form form = userToForm(user, projectsLimit, password, false, false); Response response = put(Response.Status.OK, form.asMap(), "users", user.getId()); return (response.read...
java
@Deprecated public User modifyUser(User user, CharSequence password, Integer projectsLimit) throws GitLabApiException { Form form = userToForm(user, projectsLimit, password, false, false); Response response = put(Response.Status.OK, form.asMap(), "users", user.getId()); return (response.read...
[ "@", "Deprecated", "public", "User", "modifyUser", "(", "User", "user", ",", "CharSequence", "password", ",", "Integer", "projectsLimit", ")", "throws", "GitLabApiException", "{", "Form", "form", "=", "userToForm", "(", "user", ",", "projectsLimit", ",", "passwo...
Modifies an existing user. Only administrators can change attributes of a user. <pre><code>GitLab Endpoint: PUT /users/:id</code></pre> <p>The following properties of the provided User instance can be set during update:<pre><code> email (required) - Email username (required) - Username name (required) - Name skype (o...
[ "Modifies", "an", "existing", "user", ".", "Only", "administrators", "can", "change", "attributes", "of", "a", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L530-L535
64,804
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.deleteUser
public void deleteUser(Object userIdOrUsername, Boolean hardDelete) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("hard_delete ", hardDelete); Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); de...
java
public void deleteUser(Object userIdOrUsername, Boolean hardDelete) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("hard_delete ", hardDelete); Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); de...
[ "public", "void", "deleteUser", "(", "Object", "userIdOrUsername", ",", "Boolean", "hardDelete", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"hard_delete \"", ",", "hardDelete...
Deletes a user. Available only for administrators. <pre><code>GitLab Endpoint: DELETE /users/:id</code></pre> @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param hardDelete If true, contributions that would usually be moved to the ghost user will be deleted instea...
[ "Deletes", "a", "user", ".", "Available", "only", "for", "administrators", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L559-L563
64,805
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.getCurrentUser
public User getCurrentUser() throws GitLabApiException { Response response = get(Response.Status.OK, null, "user"); return (response.readEntity(User.class)); }
java
public User getCurrentUser() throws GitLabApiException { Response response = get(Response.Status.OK, null, "user"); return (response.readEntity(User.class)); }
[ "public", "User", "getCurrentUser", "(", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"user\"", ")", ";", "return", "(", "response", ".", "readEntity", "(", "Us...
Get currently authenticated user. <pre><code>GitLab Endpoint: GET /user</code></pre> @return the User instance for the currently authenticated user @throws GitLabApiException if any exception occurs
[ "Get", "currently", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L573-L576
64,806
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.getSshKeys
public List<SshKey> getSshKeys() throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "user", "keys"); return (response.readEntity(new GenericType<List<SshKey>>() {})); }
java
public List<SshKey> getSshKeys() throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "user", "keys"); return (response.readEntity(new GenericType<List<SshKey>>() {})); }
[ "public", "List", "<", "SshKey", ">", "getSshKeys", "(", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "getDefaultPerPageParam", "(", ")", ",", "\"user\"", ",", "\"keys\"", ")", ...
Get a list of currently authenticated user's SSH keys. <pre><code>GitLab Endpoint: GET /user/keys</code></pre> @return a list of currently authenticated user's SSH keys @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "currently", "authenticated", "user", "s", "SSH", "keys", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L586-L589
64,807
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.getSshKeys
public List<SshKey> getSshKeys(Integer userId) throws GitLabApiException { if (userId == null) { throw new RuntimeException("userId cannot be null"); } Response response = get(Response.Status.OK, getDefaultPerPageParam(), "users", userId, "keys"); List<SshKey> keys = respon...
java
public List<SshKey> getSshKeys(Integer userId) throws GitLabApiException { if (userId == null) { throw new RuntimeException("userId cannot be null"); } Response response = get(Response.Status.OK, getDefaultPerPageParam(), "users", userId, "keys"); List<SshKey> keys = respon...
[ "public", "List", "<", "SshKey", ">", "getSshKeys", "(", "Integer", "userId", ")", "throws", "GitLabApiException", "{", "if", "(", "userId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"userId cannot be null\"", ")", ";", "}", "Response"...
Get a list of a specified user's SSH keys. Available only for admin users. <pre><code>GitLab Endpoint: GET /users/:id/keys</code></pre> @param userId the user ID to get the SSH keys for @return a list of a specified user's SSH keys @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "a", "specified", "user", "s", "SSH", "keys", ".", "Available", "only", "for", "admin", "users", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L600-L614
64,808
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.getSshKey
public SshKey getSshKey(Integer keyId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "user", "keys", keyId); return (response.readEntity(SshKey.class)); }
java
public SshKey getSshKey(Integer keyId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "user", "keys", keyId); return (response.readEntity(SshKey.class)); }
[ "public", "SshKey", "getSshKey", "(", "Integer", "keyId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"user\"", ",", "\"keys\"", ",", "keyId", ")", ";", "retur...
Get a single SSH Key. <pre><code>GitLab Endpoint: GET /user/keys/:key_id</code></pre> @param keyId the ID of the SSH key. @return an SshKey instance holding the info on the SSH key specified by keyId @throws GitLabApiException if any exception occurs
[ "Get", "a", "single", "SSH", "Key", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L625-L628
64,809
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.getOptionalSshKey
public Optional<SshKey> getOptionalSshKey(Integer keyId) { try { return (Optional.ofNullable(getSshKey(keyId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<SshKey> getOptionalSshKey(Integer keyId) { try { return (Optional.ofNullable(getSshKey(keyId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "SshKey", ">", "getOptionalSshKey", "(", "Integer", "keyId", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getSshKey", "(", "keyId", ")", ")", ")", ";", "}", "catch", "(", "GitLabApiException", "glae",...
Get a single SSH Key as an Optional instance. <pre><code>GitLab Endpoint: GET /user/keys/:key_id</code></pre> @param keyId the ID of the SSH key @return an SshKey as an Optional instance holding the info on the SSH key specified by keyId
[ "Get", "a", "single", "SSH", "Key", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L638-L644
64,810
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.addSshKey
public SshKey addSshKey(String title, String key) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("title", title).withParam("key", key); Response response = post(Response.Status.CREATED, formData, "user", "keys"); return (response.readEntity(SshKey.class)); ...
java
public SshKey addSshKey(String title, String key) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("title", title).withParam("key", key); Response response = post(Response.Status.CREATED, formData, "user", "keys"); return (response.readEntity(SshKey.class)); ...
[ "public", "SshKey", "addSshKey", "(", "String", "title", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"title\"", ",", "title", ")", ".", "withParam"...
Creates a new key owned by the currently authenticated user. <pre><code>GitLab Endpoint: POST /user/keys</code></pre> @param title the new SSH Key's title @param key the new SSH key @return an SshKey instance with info on the added SSH key @throws GitLabApiException if any exception occurs
[ "Creates", "a", "new", "key", "owned", "by", "the", "currently", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L656-L660
64,811
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.addSshKey
public SshKey addSshKey(Integer userId, String title, String key) throws GitLabApiException { if (userId == null) { throw new RuntimeException("userId cannot be null"); } GitLabApiForm formData = new GitLabApiForm().withParam("title", title).withParam("key", key); Response ...
java
public SshKey addSshKey(Integer userId, String title, String key) throws GitLabApiException { if (userId == null) { throw new RuntimeException("userId cannot be null"); } GitLabApiForm formData = new GitLabApiForm().withParam("title", title).withParam("key", key); Response ...
[ "public", "SshKey", "addSshKey", "(", "Integer", "userId", ",", "String", "title", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "if", "(", "userId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"userId cannot be null\"", ...
Create new key owned by specified user. Available only for admin users. <pre><code>GitLab Endpoint: POST /users/:id/keys</code></pre> @param userId the ID of the user to add the SSH key for @param title the new SSH Key's title @param key the new SSH key @return an SshKey instance with info on the added SSH key @t...
[ "Create", "new", "key", "owned", "by", "specified", "user", ".", "Available", "only", "for", "admin", "users", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L673-L687
64,812
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.getImpersonationTokens
public List<ImpersonationToken> getImpersonationTokens(Object userIdOrUsername, ImpersonationState state) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("state", state) .withParam(PER_PAGE_PARAM, getDefaultPerPage()); Response response...
java
public List<ImpersonationToken> getImpersonationTokens(Object userIdOrUsername, ImpersonationState state) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("state", state) .withParam(PER_PAGE_PARAM, getDefaultPerPage()); Response response...
[ "public", "List", "<", "ImpersonationToken", ">", "getImpersonationTokens", "(", "Object", "userIdOrUsername", ",", "ImpersonationState", "state", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withP...
Get a list of a specified user's impersonation tokens. Available only for admin users. <pre><code>GitLab Endpoint: GET /users/:id/impersonation_tokens</code></pre> @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param state the state of impersonation tokens to lis...
[ "Get", "a", "list", "of", "a", "specified", "user", "s", "impersonation", "tokens", ".", "Available", "only", "for", "admin", "users", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L750-L756
64,813
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.getImpersonationToken
public ImpersonationToken getImpersonationToken(Object userIdOrUsername, Integer tokenId) throws GitLabApiException { if (tokenId == null) { throw new RuntimeException("tokenId cannot be null"); } Response response = get(Response.Status.OK, null, "users", getUserIdOrUsername(userId...
java
public ImpersonationToken getImpersonationToken(Object userIdOrUsername, Integer tokenId) throws GitLabApiException { if (tokenId == null) { throw new RuntimeException("tokenId cannot be null"); } Response response = get(Response.Status.OK, null, "users", getUserIdOrUsername(userId...
[ "public", "ImpersonationToken", "getImpersonationToken", "(", "Object", "userIdOrUsername", ",", "Integer", "tokenId", ")", "throws", "GitLabApiException", "{", "if", "(", "tokenId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"tokenId cannot be...
Get an impersonation token of a user. Available only for admin users. <pre><code>GitLab Endpoint: GET /users/:user_id/impersonation_tokens/:impersonation_token_id</code></pre> @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param tokenId the impersonation token ID ...
[ "Get", "an", "impersonation", "token", "of", "a", "user", ".", "Available", "only", "for", "admin", "users", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L768-L776
64,814
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.getOptionalImpersonationToken
public Optional<ImpersonationToken> getOptionalImpersonationToken(Object userIdOrUsername, Integer tokenId) { try { return (Optional.ofNullable(getImpersonationToken(userIdOrUsername, tokenId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(gl...
java
public Optional<ImpersonationToken> getOptionalImpersonationToken(Object userIdOrUsername, Integer tokenId) { try { return (Optional.ofNullable(getImpersonationToken(userIdOrUsername, tokenId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(gl...
[ "public", "Optional", "<", "ImpersonationToken", ">", "getOptionalImpersonationToken", "(", "Object", "userIdOrUsername", ",", "Integer", "tokenId", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getImpersonationToken", "(", "userIdOrUsernam...
Get an impersonation token of a user as an Optional instance. Available only for admin users. <pre><code>GitLab Endpoint: GET /users/:user_id/impersonation_tokens/:impersonation_token_id</code></pre> @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param tokenId the ...
[ "Get", "an", "impersonation", "token", "of", "a", "user", "as", "an", "Optional", "instance", ".", "Available", "only", "for", "admin", "users", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L787-L793
64,815
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.createImpersonationToken
public ImpersonationToken createImpersonationToken(Object userIdOrUsername, String name, Date expiresAt, Scope[] scopes) throws GitLabApiException { if (scopes == null || scopes.length == 0) { throw new RuntimeException("scopes cannot be null or empty"); } GitLabApiForm formData = ...
java
public ImpersonationToken createImpersonationToken(Object userIdOrUsername, String name, Date expiresAt, Scope[] scopes) throws GitLabApiException { if (scopes == null || scopes.length == 0) { throw new RuntimeException("scopes cannot be null or empty"); } GitLabApiForm formData = ...
[ "public", "ImpersonationToken", "createImpersonationToken", "(", "Object", "userIdOrUsername", ",", "String", "name", ",", "Date", "expiresAt", ",", "Scope", "[", "]", "scopes", ")", "throws", "GitLabApiException", "{", "if", "(", "scopes", "==", "null", "||", "...
Create an impersonation token. Available only for admin users. <pre><code>GitLab Endpoint: POST /users/:user_id/impersonation_tokens</code></pre> @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param name the name of the impersonation token, required @param expires...
[ "Create", "an", "impersonation", "token", ".", "Available", "only", "for", "admin", "users", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L807-L823
64,816
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.revokeImpersonationToken
public void revokeImpersonationToken(Object userIdOrUsername, Integer tokenId) throws GitLabApiException { if (tokenId == null) { throw new RuntimeException("tokenId cannot be null"); } Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.St...
java
public void revokeImpersonationToken(Object userIdOrUsername, Integer tokenId) throws GitLabApiException { if (tokenId == null) { throw new RuntimeException("tokenId cannot be null"); } Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.St...
[ "public", "void", "revokeImpersonationToken", "(", "Object", "userIdOrUsername", ",", "Integer", "tokenId", ")", "throws", "GitLabApiException", "{", "if", "(", "tokenId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"tokenId cannot be null\"", ...
Revokes an impersonation token. Available only for admin users. <pre><code>GitLab Endpoint: DELETE /users/:user_id/impersonation_tokens/:impersonation_token_id</code></pre> @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param tokenId the impersonation token ID to r...
[ "Revokes", "an", "impersonation", "token", ".", "Available", "only", "for", "admin", "users", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L834-L842
64,817
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.userToForm
Form userToForm(User user, Integer projectsLimit, CharSequence password, Boolean resetPassword, boolean create) { if (create) { if ((password == null || password.toString().trim().isEmpty()) && !resetPassword) { throw new IllegalArgumentException("either password or reset_password m...
java
Form userToForm(User user, Integer projectsLimit, CharSequence password, Boolean resetPassword, boolean create) { if (create) { if ((password == null || password.toString().trim().isEmpty()) && !resetPassword) { throw new IllegalArgumentException("either password or reset_password m...
[ "Form", "userToForm", "(", "User", "user", ",", "Integer", "projectsLimit", ",", "CharSequence", "password", ",", "Boolean", "resetPassword", ",", "boolean", "create", ")", "{", "if", "(", "create", ")", "{", "if", "(", "(", "password", "==", "null", "||",...
Populate the REST form with data from the User instance. @param user the User instance to populate the Form instance with @param projectsLimit the maximum number of projects the user is allowed (optional) @param password the password, required when creating a new user @param create whether the for...
[ "Populate", "the", "REST", "form", "with", "data", "from", "the", "User", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L853-L885
64,818
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.createCustomAttribute
public CustomAttribute createCustomAttribute(final Object userIdOrUsername, final String key, final String value) throws GitLabApiException { if (Objects.isNull(key) || key.trim().isEmpty()) { throw new IllegalArgumentException("Key can't be null or empty"); } if (Objects.isNull(val...
java
public CustomAttribute createCustomAttribute(final Object userIdOrUsername, final String key, final String value) throws GitLabApiException { if (Objects.isNull(key) || key.trim().isEmpty()) { throw new IllegalArgumentException("Key can't be null or empty"); } if (Objects.isNull(val...
[ "public", "CustomAttribute", "createCustomAttribute", "(", "final", "Object", "userIdOrUsername", ",", "final", "String", "key", ",", "final", "String", "value", ")", "throws", "GitLabApiException", "{", "if", "(", "Objects", ".", "isNull", "(", "key", ")", "||"...
Creates custom attribute for the given user @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param key for the customAttribute @param value or the customAttribute @return the created CustomAttribute @throws GitLabApiException on failure while setting customAttributes
[ "Creates", "custom", "attribute", "for", "the", "given", "user" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L911-L924
64,819
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.changeCustomAttribute
public CustomAttribute changeCustomAttribute(final Object userIdOrUsername, final CustomAttribute customAttribute) throws GitLabApiException { if (Objects.isNull(customAttribute)) { throw new IllegalArgumentException("CustomAttributes can't be null"); } //changing & creating custom...
java
public CustomAttribute changeCustomAttribute(final Object userIdOrUsername, final CustomAttribute customAttribute) throws GitLabApiException { if (Objects.isNull(customAttribute)) { throw new IllegalArgumentException("CustomAttributes can't be null"); } //changing & creating custom...
[ "public", "CustomAttribute", "changeCustomAttribute", "(", "final", "Object", "userIdOrUsername", ",", "final", "CustomAttribute", "customAttribute", ")", "throws", "GitLabApiException", "{", "if", "(", "Objects", ".", "isNull", "(", "customAttribute", ")", ")", "{", ...
Change custom attribute for the given user @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param customAttribute the custome attribute to change @return the changed CustomAttribute @throws GitLabApiException on failure while changing customAttributes
[ "Change", "custom", "attribute", "for", "the", "given", "user" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L934-L943
64,820
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.changeCustomAttribute
public CustomAttribute changeCustomAttribute(final Object userIdOrUsername, final String key, final String value) throws GitLabApiException { return createCustomAttribute(userIdOrUsername, key, value); }
java
public CustomAttribute changeCustomAttribute(final Object userIdOrUsername, final String key, final String value) throws GitLabApiException { return createCustomAttribute(userIdOrUsername, key, value); }
[ "public", "CustomAttribute", "changeCustomAttribute", "(", "final", "Object", "userIdOrUsername", ",", "final", "String", "key", ",", "final", "String", "value", ")", "throws", "GitLabApiException", "{", "return", "createCustomAttribute", "(", "userIdOrUsername", ",", ...
Changes custom attribute for the given user @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param key for the customAttribute @param value for the customAttribute @return changedCustomAttribute @throws GitLabApiException on failure while changing customAttributes
[ "Changes", "custom", "attribute", "for", "the", "given", "user" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L954-L956
64,821
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.createGitLabApiForm
private GitLabApiForm createGitLabApiForm() { GitLabApiForm formData = new GitLabApiForm(); return (customAttributesEnabled ? formData.withParam("with_custom_attributes", true) : formData); }
java
private GitLabApiForm createGitLabApiForm() { GitLabApiForm formData = new GitLabApiForm(); return (customAttributesEnabled ? formData.withParam("with_custom_attributes", true) : formData); }
[ "private", "GitLabApiForm", "createGitLabApiForm", "(", ")", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ";", "return", "(", "customAttributesEnabled", "?", "formData", ".", "withParam", "(", "\"with_custom_attributes\"", ",", "true", ")...
Creates a GitLabApiForm instance that will optionally include the with_custom_attributes query param if enabled. @return a GitLabApiForm instance that will optionally include the with_custom_attributes query param if enabled
[ "Creates", "a", "GitLabApiForm", "instance", "that", "will", "optionally", "include", "the", "with_custom_attributes", "query", "param", "if", "enabled", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L996-L999
64,822
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.setUserAvatar
public User setUserAvatar(final Object userIdOrUsername, File avatarFile) throws GitLabApiException { Response response = putUpload(Response.Status.OK, "avatar", avatarFile, "users", getUserIdOrUsername(userIdOrUsername)); return (response.readEntity(User.class)); }
java
public User setUserAvatar(final Object userIdOrUsername, File avatarFile) throws GitLabApiException { Response response = putUpload(Response.Status.OK, "avatar", avatarFile, "users", getUserIdOrUsername(userIdOrUsername)); return (response.readEntity(User.class)); }
[ "public", "User", "setUserAvatar", "(", "final", "Object", "userIdOrUsername", ",", "File", "avatarFile", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "putUpload", "(", "Response", ".", "Status", ".", "OK", ",", "\"avatar\"", ",", "avat...
Uploads and sets the user's avatar for the specified user. <pre><code>PUT /users/:id</code></pre> @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param avatarFile the File instance of the avatar file to upload @return the updated User instance @throws GitLabApiExcep...
[ "Uploads", "and", "sets", "the", "user", "s", "avatar", "for", "the", "specified", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L1011-L1014
64,823
javers/javers
javers-core/src/main/java/org/javers/core/graph/LiveGraphFactory.java
LiveGraphFactory.convertToObjectArray
private static Object[] convertToObjectArray(Object obj) { if (obj instanceof Object[]) { return (Object[]) obj; } int arrayLength = Array.getLength(obj); Object[] retArray = new Object[arrayLength]; for (int i = 0; i < arrayLength; ++i){ retArray[i] = Arr...
java
private static Object[] convertToObjectArray(Object obj) { if (obj instanceof Object[]) { return (Object[]) obj; } int arrayLength = Array.getLength(obj); Object[] retArray = new Object[arrayLength]; for (int i = 0; i < arrayLength; ++i){ retArray[i] = Arr...
[ "private", "static", "Object", "[", "]", "convertToObjectArray", "(", "Object", "obj", ")", "{", "if", "(", "obj", "instanceof", "Object", "[", "]", ")", "{", "return", "(", "Object", "[", "]", ")", "obj", ";", "}", "int", "arrayLength", "=", "Array", ...
as there seems be no legal way for casting
[ "as", "there", "seems", "be", "no", "legal", "way", "for", "casting" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/graph/LiveGraphFactory.java#L119-L129
64,824
javers/javers
javers-core/src/main/java/org/javers/common/properties/PropertiesUtil.java
PropertiesUtil.loadProperties
public static void loadProperties(String classpathName, Properties toProps) { Validate.argumentIsNotNull(classpathName); Validate.argumentIsNotNull(toProps); InputStream inputStream = PropertiesUtil.class.getClassLoader().getResourceAsStream(classpathName); if (inputStream == null) { ...
java
public static void loadProperties(String classpathName, Properties toProps) { Validate.argumentIsNotNull(classpathName); Validate.argumentIsNotNull(toProps); InputStream inputStream = PropertiesUtil.class.getClassLoader().getResourceAsStream(classpathName); if (inputStream == null) { ...
[ "public", "static", "void", "loadProperties", "(", "String", "classpathName", ",", "Properties", "toProps", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "classpathName", ")", ";", "Validate", ".", "argumentIsNotNull", "(", "toProps", ")", ";", "InputStream...
loads a properties file from classpath using default classloader @param classpathName classpath resource name @throws JaversException CLASSPATH_RESOURCE_NOT_FOUND @see ClassLoader#getResourceAsStream(String)
[ "loads", "a", "properties", "file", "from", "classpath", "using", "default", "classloader" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/common/properties/PropertiesUtil.java#L71-L86
64,825
javers/javers
javers-core/src/main/java/org/javers/guava/MultimapChangeAppender.java
MultimapChangeAppender.difference
private static Collection difference(Collection first, Collection second){ if (first == null) { return EMPTY_LIST; } if (second == null) { return first; } Collection difference = new ArrayList<>(first); for (Object current : second){ ...
java
private static Collection difference(Collection first, Collection second){ if (first == null) { return EMPTY_LIST; } if (second == null) { return first; } Collection difference = new ArrayList<>(first); for (Object current : second){ ...
[ "private", "static", "Collection", "difference", "(", "Collection", "first", ",", "Collection", "second", ")", "{", "if", "(", "first", "==", "null", ")", "{", "return", "EMPTY_LIST", ";", "}", "if", "(", "second", "==", "null", ")", "{", "return", "firs...
Difference that handle properly collections with duplicates.
[ "Difference", "that", "handle", "properly", "collections", "with", "duplicates", "." ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/guava/MultimapChangeAppender.java#L91-L105
64,826
javers/javers
javers-core/src/main/java/org/javers/repository/api/JaversExtendedRepository.java
JaversExtendedRepository.getHistoricals
public List<CdoSnapshot> getHistoricals(GlobalId globalId, CommitId timePoint, boolean withChildValueObjects, int limit) { argumentsAreNotNull(globalId, timePoint); return delegate.getStateHistory(globalId, QueryParamsBuilder .withLimit(limit) .withChildV...
java
public List<CdoSnapshot> getHistoricals(GlobalId globalId, CommitId timePoint, boolean withChildValueObjects, int limit) { argumentsAreNotNull(globalId, timePoint); return delegate.getStateHistory(globalId, QueryParamsBuilder .withLimit(limit) .withChildV...
[ "public", "List", "<", "CdoSnapshot", ">", "getHistoricals", "(", "GlobalId", "globalId", ",", "CommitId", "timePoint", ",", "boolean", "withChildValueObjects", ",", "int", "limit", ")", "{", "argumentsAreNotNull", "(", "globalId", ",", "timePoint", ")", ";", "r...
last snapshot with commitId <= given timePoint
[ "last", "snapshot", "with", "commitId", "<", "=", "given", "timePoint" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/repository/api/JaversExtendedRepository.java#L104-L111
64,827
javers/javers
javers-core/src/main/java/org/javers/repository/api/JaversExtendedRepository.java
JaversExtendedRepository.getHistorical
public Optional<CdoSnapshot> getHistorical(GlobalId globalId, LocalDateTime timePoint) { argumentsAreNotNull(globalId, timePoint); return delegate.getStateHistory(globalId, QueryParamsBuilder.withLimit(1).to(timePoint).build()) .stream().findFirst(); }
java
public Optional<CdoSnapshot> getHistorical(GlobalId globalId, LocalDateTime timePoint) { argumentsAreNotNull(globalId, timePoint); return delegate.getStateHistory(globalId, QueryParamsBuilder.withLimit(1).to(timePoint).build()) .stream().findFirst(); }
[ "public", "Optional", "<", "CdoSnapshot", ">", "getHistorical", "(", "GlobalId", "globalId", ",", "LocalDateTime", "timePoint", ")", "{", "argumentsAreNotNull", "(", "globalId", ",", "timePoint", ")", ";", "return", "delegate", ".", "getStateHistory", "(", "global...
last snapshot with commitId <= given date
[ "last", "snapshot", "with", "commitId", "<", "=", "given", "date" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/repository/api/JaversExtendedRepository.java#L116-L121
64,828
javers/javers
javers-core/src/main/java/org/javers/repository/api/JaversExtendedRepository.java
JaversExtendedRepository.loadMasterEntitySnapshotIfNecessary
private List<CdoSnapshot> loadMasterEntitySnapshotIfNecessary(InstanceId instanceId, List<CdoSnapshot> alreadyLoaded) { if (alreadyLoaded.isEmpty()) { return alreadyLoaded; } if (alreadyLoaded.stream().filter(s -> s.getGlobalId().equals(instanceId)).findFirst().isPresent()) { ...
java
private List<CdoSnapshot> loadMasterEntitySnapshotIfNecessary(InstanceId instanceId, List<CdoSnapshot> alreadyLoaded) { if (alreadyLoaded.isEmpty()) { return alreadyLoaded; } if (alreadyLoaded.stream().filter(s -> s.getGlobalId().equals(instanceId)).findFirst().isPresent()) { ...
[ "private", "List", "<", "CdoSnapshot", ">", "loadMasterEntitySnapshotIfNecessary", "(", "InstanceId", "instanceId", ",", "List", "<", "CdoSnapshot", ">", "alreadyLoaded", ")", "{", "if", "(", "alreadyLoaded", ".", "isEmpty", "(", ")", ")", "{", "return", "alread...
required for the corner case, when valueObject snapshots consume all the limit
[ "required", "for", "the", "corner", "case", "when", "valueObject", "snapshots", "consume", "all", "the", "limit" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/repository/api/JaversExtendedRepository.java#L189-L203
64,829
javers/javers
javers-persistence-sql/src/main/java/org/javers/repository/sql/SqlRepositoryBuilder.java
SqlRepositoryBuilder.withSchema
public SqlRepositoryBuilder withSchema(String schemaName) { if (schemaName != null && !schemaName.isEmpty()) { this.schemaName = schemaName; } return this; }
java
public SqlRepositoryBuilder withSchema(String schemaName) { if (schemaName != null && !schemaName.isEmpty()) { this.schemaName = schemaName; } return this; }
[ "public", "SqlRepositoryBuilder", "withSchema", "(", "String", "schemaName", ")", "{", "if", "(", "schemaName", "!=", "null", "&&", "!", "schemaName", ".", "isEmpty", "(", ")", ")", "{", "this", ".", "schemaName", "=", "schemaName", ";", "}", "return", "th...
This function sets a schema to be used for creation and updating tables. When passing a schema name make sure that the schema has been created in the database before running JaVers. If schemaName is null or empty, the default schema is used instead. @since 2.4
[ "This", "function", "sets", "a", "schema", "to", "be", "used", "for", "creation", "and", "updating", "tables", ".", "When", "passing", "a", "schema", "name", "make", "sure", "that", "the", "schema", "has", "been", "created", "in", "the", "database", "befor...
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-persistence-sql/src/main/java/org/javers/repository/sql/SqlRepositoryBuilder.java#L51-L56
64,830
javers/javers
javers-core/src/main/java/org/javers/core/metamodel/object/CdoSnapshotState.java
CdoSnapshotState.getPropertyValue
public Object getPropertyValue(Property property) { Validate.argumentIsNotNull(property); Object val = properties.get(property.getName()); if (val == null){ return Defaults.defaultValue(property.getGenericType()); } return val; }
java
public Object getPropertyValue(Property property) { Validate.argumentIsNotNull(property); Object val = properties.get(property.getName()); if (val == null){ return Defaults.defaultValue(property.getGenericType()); } return val; }
[ "public", "Object", "getPropertyValue", "(", "Property", "property", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "property", ")", ";", "Object", "val", "=", "properties", ".", "get", "(", "property", ".", "getName", "(", ")", ")", ";", "if", "(", ...
returns default values for null primitives
[ "returns", "default", "values", "for", "null", "primitives" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/metamodel/object/CdoSnapshotState.java#L32-L39
64,831
javers/javers
javers-core/src/main/java/org/javers/core/diff/Diff.java
Diff.getObjectsByChangeType
public <C extends Change> List getObjectsByChangeType(final Class<C> type) { argumentIsNotNull(type); return Lists.transform(getChangesByType(type), input -> input.getAffectedObject().<JaversException>orElseThrow(() -> new JaversException(AFFECTED_CDO_IS_NOT_AVAILABLE))); }
java
public <C extends Change> List getObjectsByChangeType(final Class<C> type) { argumentIsNotNull(type); return Lists.transform(getChangesByType(type), input -> input.getAffectedObject().<JaversException>orElseThrow(() -> new JaversException(AFFECTED_CDO_IS_NOT_AVAILABLE))); }
[ "public", "<", "C", "extends", "Change", ">", "List", "getObjectsByChangeType", "(", "final", "Class", "<", "C", ">", "type", ")", "{", "argumentIsNotNull", "(", "type", ")", ";", "return", "Lists", ".", "transform", "(", "getChangesByType", "(", "type", "...
Selects new, removed or changed objects @throws JaversException AFFECTED_CDO_IS_NOT_AVAILABLE if diff is restored from a repository
[ "Selects", "new", "removed", "or", "changed", "objects" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/diff/Diff.java#L53-L58
64,832
javers/javers
javers-core/src/main/java/org/javers/core/diff/Diff.java
Diff.getObjectsWithChangedProperty
public List getObjectsWithChangedProperty(String propertyName){ argumentIsNotNull(propertyName); return Lists.transform(getPropertyChanges(propertyName), input -> input.getAffectedObject().<JaversException>orElseThrow(() -> new JaversException(AFFECTED_CDO_IS_NOT_AVAILABLE))); }
java
public List getObjectsWithChangedProperty(String propertyName){ argumentIsNotNull(propertyName); return Lists.transform(getPropertyChanges(propertyName), input -> input.getAffectedObject().<JaversException>orElseThrow(() -> new JaversException(AFFECTED_CDO_IS_NOT_AVAILABLE))); }
[ "public", "List", "getObjectsWithChangedProperty", "(", "String", "propertyName", ")", "{", "argumentIsNotNull", "(", "propertyName", ")", ";", "return", "Lists", ".", "transform", "(", "getPropertyChanges", "(", "propertyName", ")", ",", "input", "->", "input", "...
Selects objects with changed property for given property name @throws JaversException AFFECTED_CDO_IS_NOT_AVAILABLE if diff is restored from repository,
[ "Selects", "objects", "with", "changed", "property", "for", "given", "property", "name" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/diff/Diff.java#L66-L71
64,833
javers/javers
javers-core/src/main/java/org/javers/core/diff/Diff.java
Diff.getChanges
public List<Change> getChanges(Predicate<Change> predicate) { return Lists.positiveFilter(changes, predicate); }
java
public List<Change> getChanges(Predicate<Change> predicate) { return Lists.positiveFilter(changes, predicate); }
[ "public", "List", "<", "Change", ">", "getChanges", "(", "Predicate", "<", "Change", ">", "predicate", ")", "{", "return", "Lists", ".", "positiveFilter", "(", "changes", ",", "predicate", ")", ";", "}" ]
Changes that satisfies given filter
[ "Changes", "that", "satisfies", "given", "filter" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/diff/Diff.java#L94-L96
64,834
javers/javers
javers-core/src/main/java/org/javers/core/diff/Diff.java
Diff.getPropertyChanges
public List<PropertyChange> getPropertyChanges(final String propertyName) { argumentIsNotNull(propertyName); return (List)getChanges(input -> input instanceof PropertyChange && ((PropertyChange)input).getPropertyName().equals(propertyName)); }
java
public List<PropertyChange> getPropertyChanges(final String propertyName) { argumentIsNotNull(propertyName); return (List)getChanges(input -> input instanceof PropertyChange && ((PropertyChange)input).getPropertyName().equals(propertyName)); }
[ "public", "List", "<", "PropertyChange", ">", "getPropertyChanges", "(", "final", "String", "propertyName", ")", "{", "argumentIsNotNull", "(", "propertyName", ")", ";", "return", "(", "List", ")", "getChanges", "(", "input", "->", "input", "instanceof", "Proper...
Selects property changes for given property name
[ "Selects", "property", "changes", "for", "given", "property", "name" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/diff/Diff.java#L106-L109
64,835
javers/javers
javers-core/src/main/java/org/javers/core/snapshot/SnapshotDiffer.java
SnapshotDiffer.calculateDiffs
public List<Change> calculateDiffs(List<CdoSnapshot> snapshots, Map<SnapshotIdentifier, CdoSnapshot> previousSnapshots) { Validate.argumentsAreNotNull(snapshots); Validate.argumentsAreNotNull(previousSnapshots); List<Change> changes = new ArrayList<>(); for (CdoSnapshot snapshot : snaps...
java
public List<Change> calculateDiffs(List<CdoSnapshot> snapshots, Map<SnapshotIdentifier, CdoSnapshot> previousSnapshots) { Validate.argumentsAreNotNull(snapshots); Validate.argumentsAreNotNull(previousSnapshots); List<Change> changes = new ArrayList<>(); for (CdoSnapshot snapshot : snaps...
[ "public", "List", "<", "Change", ">", "calculateDiffs", "(", "List", "<", "CdoSnapshot", ">", "snapshots", ",", "Map", "<", "SnapshotIdentifier", ",", "CdoSnapshot", ">", "previousSnapshots", ")", "{", "Validate", ".", "argumentsAreNotNull", "(", "snapshots", ")...
Calculates changes introduced by a collection of snapshots. This method expects that the previousSnapshots map contains predecessors of all non-initial and non-terminal snapshots.
[ "Calculates", "changes", "introduced", "by", "a", "collection", "of", "snapshots", ".", "This", "method", "expects", "that", "the", "previousSnapshots", "map", "contains", "predecessors", "of", "all", "non", "-", "initial", "and", "non", "-", "terminal", "snapsh...
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/snapshot/SnapshotDiffer.java#L33-L49
64,836
javers/javers
javers-core/src/main/java/org/javers/core/metamodel/type/EnumerableType.java
EnumerableType.filterToList
public <T> List<T> filterToList(Object source, Class<T> filter) { Validate.argumentsAreNotNull(filter); return (List) unmodifiableList( items(source).filter(item -> item!=null && filter.isAssignableFrom(item.getClass())) .collect(Collectors.toList())); }
java
public <T> List<T> filterToList(Object source, Class<T> filter) { Validate.argumentsAreNotNull(filter); return (List) unmodifiableList( items(source).filter(item -> item!=null && filter.isAssignableFrom(item.getClass())) .collect(Collectors.toList())); }
[ "public", "<", "T", ">", "List", "<", "T", ">", "filterToList", "(", "Object", "source", ",", "Class", "<", "T", ">", "filter", ")", "{", "Validate", ".", "argumentsAreNotNull", "(", "filter", ")", ";", "return", "(", "List", ")", "unmodifiableList", "...
Returns a new, unmodifiable Enumerable with filtered items, nulls are omitted.
[ "Returns", "a", "new", "unmodifiable", "Enumerable", "with", "filtered", "items", "nulls", "are", "omitted", "." ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/metamodel/type/EnumerableType.java#L50-L56
64,837
javers/javers
javers-core/src/main/java/org/javers/core/metamodel/type/ManagedClass.java
ManagedClass.getManagedProperties
List<JaversProperty> getManagedProperties(Predicate<JaversProperty> query) { return Lists.positiveFilter(managedProperties, query); }
java
List<JaversProperty> getManagedProperties(Predicate<JaversProperty> query) { return Lists.positiveFilter(managedProperties, query); }
[ "List", "<", "JaversProperty", ">", "getManagedProperties", "(", "Predicate", "<", "JaversProperty", ">", "query", ")", "{", "return", "Lists", ".", "positiveFilter", "(", "managedProperties", ",", "query", ")", ";", "}" ]
returns managed properties subset
[ "returns", "managed", "properties", "subset" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/metamodel/type/ManagedClass.java#L71-L73
64,838
javers/javers
javers-core/src/main/java/org/javers/core/metamodel/type/TypeMapper.java
TypeMapper.getMapContentType
public MapContentType getMapContentType(ContainerType containerType){ JaversType keyType = getJaversType(Integer.class); JaversType valueType = getJaversType(containerType.getItemType()); return new MapContentType(keyType, valueType); }
java
public MapContentType getMapContentType(ContainerType containerType){ JaversType keyType = getJaversType(Integer.class); JaversType valueType = getJaversType(containerType.getItemType()); return new MapContentType(keyType, valueType); }
[ "public", "MapContentType", "getMapContentType", "(", "ContainerType", "containerType", ")", "{", "JaversType", "keyType", "=", "getJaversType", "(", "Integer", ".", "class", ")", ";", "JaversType", "valueType", "=", "getJaversType", "(", "containerType", ".", "getI...
only for change appenders
[ "only", "for", "change", "appenders" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/metamodel/type/TypeMapper.java#L64-L68
64,839
javers/javers
javers-core/src/main/java/org/javers/core/metamodel/type/TypeMapper.java
TypeMapper.isContainerOfManagedTypes
public boolean isContainerOfManagedTypes(JaversType javersType){ if (! (javersType instanceof ContainerType)) { return false; } return getJaversType(((ContainerType)javersType).getItemType()) instanceof ManagedType; }
java
public boolean isContainerOfManagedTypes(JaversType javersType){ if (! (javersType instanceof ContainerType)) { return false; } return getJaversType(((ContainerType)javersType).getItemType()) instanceof ManagedType; }
[ "public", "boolean", "isContainerOfManagedTypes", "(", "JaversType", "javersType", ")", "{", "if", "(", "!", "(", "javersType", "instanceof", "ContainerType", ")", ")", "{", "return", "false", ";", "}", "return", "getJaversType", "(", "(", "(", "ContainerType", ...
is Set, List or Array of ManagedClasses
[ "is", "Set", "List", "or", "Array", "of", "ManagedClasses" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/metamodel/type/TypeMapper.java#L73-L79
64,840
javers/javers
javers-core/src/main/java/org/javers/core/metamodel/type/TypeMapper.java
TypeMapper.getJaversType
public JaversType getJaversType(Type javaType) { argumentIsNotNull(javaType); if (javaType == Object.class) { return OBJECT_TYPE; } return engine.computeIfAbsent(javaType, j -> typeFactory.infer(j, findPrototype(j))); }
java
public JaversType getJaversType(Type javaType) { argumentIsNotNull(javaType); if (javaType == Object.class) { return OBJECT_TYPE; } return engine.computeIfAbsent(javaType, j -> typeFactory.infer(j, findPrototype(j))); }
[ "public", "JaversType", "getJaversType", "(", "Type", "javaType", ")", "{", "argumentIsNotNull", "(", "javaType", ")", ";", "if", "(", "javaType", "==", "Object", ".", "class", ")", "{", "return", "OBJECT_TYPE", ";", "}", "return", "engine", ".", "computeIfA...
Returns mapped type, spawns a new one from a prototype, or infers a new one using default mapping.
[ "Returns", "mapped", "type", "spawns", "a", "new", "one", "from", "a", "prototype", "or", "infers", "a", "new", "one", "using", "default", "mapping", "." ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/metamodel/type/TypeMapper.java#L109-L117
64,841
javers/javers
javers-core/src/main/java/org/javers/core/metamodel/type/TypeMapper.java
TypeMapper.getJaversManagedType
public <T extends ManagedType> T getJaversManagedType(Class javaClass, Class<T> expectedType) { JaversType mType = getJaversType(javaClass); if (expectedType.isAssignableFrom(mType.getClass())) { return (T) mType; } else { throw new JaversException(JaversExceptionCode.MA...
java
public <T extends ManagedType> T getJaversManagedType(Class javaClass, Class<T> expectedType) { JaversType mType = getJaversType(javaClass); if (expectedType.isAssignableFrom(mType.getClass())) { return (T) mType; } else { throw new JaversException(JaversExceptionCode.MA...
[ "public", "<", "T", "extends", "ManagedType", ">", "T", "getJaversManagedType", "(", "Class", "javaClass", ",", "Class", "<", "T", ">", "expectedType", ")", "{", "JaversType", "mType", "=", "getJaversType", "(", "javaClass", ")", ";", "if", "(", "expectedTyp...
If given javaClass is mapped to expected ManagedType, returns its JaversType @throws JaversException MANAGED_CLASS_MAPPING_ERROR
[ "If", "given", "javaClass", "is", "mapped", "to", "expected", "ManagedType", "returns", "its", "JaversType" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/metamodel/type/TypeMapper.java#L179-L190
64,842
javers/javers
javers-spring-boot-starter-mongo/src/main/java/org/javers/spring/boot/mongo/JaversMongoAutoConfiguration.java
JaversMongoAutoConfiguration.javers
@Bean(name = "JaversFromStarter") @ConditionalOnMissingBean public Javers javers() { logger.info("Starting javers-spring-boot-starter-mongo ..."); MongoDatabase mongoDatabase = mongoClient.getDatabase( mongoProperties.getMongoClientDatabase() ); logger.info("connecting to database: {}"...
java
@Bean(name = "JaversFromStarter") @ConditionalOnMissingBean public Javers javers() { logger.info("Starting javers-spring-boot-starter-mongo ..."); MongoDatabase mongoDatabase = mongoClient.getDatabase( mongoProperties.getMongoClientDatabase() ); logger.info("connecting to database: {}"...
[ "@", "Bean", "(", "name", "=", "\"JaversFromStarter\"", ")", "@", "ConditionalOnMissingBean", "public", "Javers", "javers", "(", ")", "{", "logger", ".", "info", "(", "\"Starting javers-spring-boot-starter-mongo ...\"", ")", ";", "MongoDatabase", "mongoDatabase", "=",...
from spring-boot-starter-data-mongodb
[ "from", "spring", "-", "boot", "-", "starter", "-", "data", "-", "mongodb" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-spring-boot-starter-mongo/src/main/java/org/javers/spring/boot/mongo/JaversMongoAutoConfiguration.java#L45-L61
64,843
javers/javers
javers-core/src/main/java/org/javers/core/diff/DiffFactory.java
DiffFactory.createAndAppendChanges
private Diff createAndAppendChanges(GraphPair graphPair, Optional<CommitMetadata> commitMetadata) { DiffBuilder diff = new DiffBuilder(javersCoreConfiguration.getPrettyValuePrinter()); //calculate node scope diff for (NodeChangeAppender appender : nodeChangeAppenders) { diff.addChan...
java
private Diff createAndAppendChanges(GraphPair graphPair, Optional<CommitMetadata> commitMetadata) { DiffBuilder diff = new DiffBuilder(javersCoreConfiguration.getPrettyValuePrinter()); //calculate node scope diff for (NodeChangeAppender appender : nodeChangeAppenders) { diff.addChan...
[ "private", "Diff", "createAndAppendChanges", "(", "GraphPair", "graphPair", ",", "Optional", "<", "CommitMetadata", ">", "commitMetadata", ")", "{", "DiffBuilder", "diff", "=", "new", "DiffBuilder", "(", "javersCoreConfiguration", ".", "getPrettyValuePrinter", "(", ")...
Graph scope appender
[ "Graph", "scope", "appender" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/diff/DiffFactory.java#L107-L129
64,844
javers/javers
javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/JaversSchemaManager.java
JaversSchemaManager.addCommitDateInstantColumnIfNeeded
private void addCommitDateInstantColumnIfNeeded() { if (!columnExists(getCommitTableNameWithSchema(), COMMIT_COMMIT_DATE_INSTANT)){ addStringColumn(getCommitTableNameWithSchema(), COMMIT_COMMIT_DATE_INSTANT, 30); } else { extendStringColumnIfNeeded(getCommitTableNameWithSchema(),...
java
private void addCommitDateInstantColumnIfNeeded() { if (!columnExists(getCommitTableNameWithSchema(), COMMIT_COMMIT_DATE_INSTANT)){ addStringColumn(getCommitTableNameWithSchema(), COMMIT_COMMIT_DATE_INSTANT, 30); } else { extendStringColumnIfNeeded(getCommitTableNameWithSchema(),...
[ "private", "void", "addCommitDateInstantColumnIfNeeded", "(", ")", "{", "if", "(", "!", "columnExists", "(", "getCommitTableNameWithSchema", "(", ")", ",", "COMMIT_COMMIT_DATE_INSTANT", ")", ")", "{", "addStringColumn", "(", "getCommitTableNameWithSchema", "(", ")", "...
JaVers 5.0 to 5.1 schema migration
[ "JaVers", "5", ".", "0", "to", "5", ".", "1", "schema", "migration" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/JaversSchemaManager.java#L72-L78
64,845
javers/javers
javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/JaversSchemaManager.java
JaversSchemaManager.alterCommitIdColumnIfNeeded
private void alterCommitIdColumnIfNeeded() { ColumnType commitIdColType = getTypeOf(getCommitTableNameWithSchema(), "commit_id"); if (commitIdColType.precision == 12) { logger.info("migrating db schema from JaVers 2.5 to 2.6 ..."); if (dialect instanceof PostgresDialect) { ...
java
private void alterCommitIdColumnIfNeeded() { ColumnType commitIdColType = getTypeOf(getCommitTableNameWithSchema(), "commit_id"); if (commitIdColType.precision == 12) { logger.info("migrating db schema from JaVers 2.5 to 2.6 ..."); if (dialect instanceof PostgresDialect) { ...
[ "private", "void", "alterCommitIdColumnIfNeeded", "(", ")", "{", "ColumnType", "commitIdColType", "=", "getTypeOf", "(", "getCommitTableNameWithSchema", "(", ")", ",", "\"commit_id\"", ")", ";", "if", "(", "commitIdColType", ".", "precision", "==", "12", ")", "{",...
JaVers 2.5 to 2.6 schema migration
[ "JaVers", "2", ".", "5", "to", "2", ".", "6", "schema", "migration" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/JaversSchemaManager.java#L103-L124
64,846
javers/javers
javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/JaversSchemaManager.java
JaversSchemaManager.alterMssqlTextColumns
private void alterMssqlTextColumns() { ColumnType stateColType = getTypeOf(getSnapshotTableNameWithSchema(), "state"); ColumnType changedPropertiesColType = getTypeOf(getSnapshotTableNameWithSchema(), "state"); if(stateColType.typeName.equals("text")) { executeSQL("ALTER TABLE " + g...
java
private void alterMssqlTextColumns() { ColumnType stateColType = getTypeOf(getSnapshotTableNameWithSchema(), "state"); ColumnType changedPropertiesColType = getTypeOf(getSnapshotTableNameWithSchema(), "state"); if(stateColType.typeName.equals("text")) { executeSQL("ALTER TABLE " + g...
[ "private", "void", "alterMssqlTextColumns", "(", ")", "{", "ColumnType", "stateColType", "=", "getTypeOf", "(", "getSnapshotTableNameWithSchema", "(", ")", ",", "\"state\"", ")", ";", "ColumnType", "changedPropertiesColType", "=", "getTypeOf", "(", "getSnapshotTableName...
JaVers 3.3.0 to 3.3.1 MsSql schema migration This method is needed for upgrading TEXT columns to VARCHAR(MAX) since TEXT is deprecated.
[ "JaVers", "3", ".", "3", ".", "0", "to", "3", ".", "3", ".", "1", "MsSql", "schema", "migration" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-persistence-sql/src/main/java/org/javers/repository/sql/schema/JaversSchemaManager.java#L131-L142
64,847
javers/javers
javers-core/src/main/java/org/javers/guava/MultimapType.java
MultimapType.map
@Override public Object map(Object sourceEnumerable, Function mapFunction, boolean filterNulls) { Validate.argumentIsNotNull(mapFunction); Multimap sourceMultimap = toNotNullMultimap(sourceEnumerable); Multimap targetMultimap = ArrayListMultimap.create(); MapType.mapEntrySet(source...
java
@Override public Object map(Object sourceEnumerable, Function mapFunction, boolean filterNulls) { Validate.argumentIsNotNull(mapFunction); Multimap sourceMultimap = toNotNullMultimap(sourceEnumerable); Multimap targetMultimap = ArrayListMultimap.create(); MapType.mapEntrySet(source...
[ "@", "Override", "public", "Object", "map", "(", "Object", "sourceEnumerable", ",", "Function", "mapFunction", ",", "boolean", "filterNulls", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "mapFunction", ")", ";", "Multimap", "sourceMultimap", "=", "toNotNul...
Nulls keys are filtered
[ "Nulls", "keys", "are", "filtered" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/guava/MultimapType.java#L59-L69
64,848
javers/javers
javers-core/src/main/java/org/javers/core/JaversBuilder.java
JaversBuilder.bootJsonConverter
private Collection<JaversType> bootJsonConverter() { JsonConverterBuilder jsonConverterBuilder = jsonConverterBuilder(); addModule(new ChangeTypeAdaptersModule(getContainer())); addModule(new CommitTypeAdaptersModule(getContainer())); if (new RequiredMongoSupportPredicate().test(reposi...
java
private Collection<JaversType> bootJsonConverter() { JsonConverterBuilder jsonConverterBuilder = jsonConverterBuilder(); addModule(new ChangeTypeAdaptersModule(getContainer())); addModule(new CommitTypeAdaptersModule(getContainer())); if (new RequiredMongoSupportPredicate().test(reposi...
[ "private", "Collection", "<", "JaversType", ">", "bootJsonConverter", "(", ")", "{", "JsonConverterBuilder", "jsonConverterBuilder", "=", "jsonConverterBuilder", "(", ")", ";", "addModule", "(", "new", "ChangeTypeAdaptersModule", "(", "getContainer", "(", ")", ")", ...
boots JsonConverter and registers domain aware typeAdapters
[ "boots", "JsonConverter", "and", "registers", "domain", "aware", "typeAdapters" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/JaversBuilder.java#L732-L748
64,849
javers/javers
javers-core/src/main/java/org/javers/core/graph/NodeReuser.java
NodeReuser.reverseCdoIdMapKey
private Object reverseCdoIdMapKey(Cdo cdo) { if (cdo.getGlobalId() instanceof InstanceId) { return cdo.getGlobalId(); } return new SystemIdentityWrapper(cdo.getWrappedCdo().get()); }
java
private Object reverseCdoIdMapKey(Cdo cdo) { if (cdo.getGlobalId() instanceof InstanceId) { return cdo.getGlobalId(); } return new SystemIdentityWrapper(cdo.getWrappedCdo().get()); }
[ "private", "Object", "reverseCdoIdMapKey", "(", "Cdo", "cdo", ")", "{", "if", "(", "cdo", ".", "getGlobalId", "(", ")", "instanceof", "InstanceId", ")", "{", "return", "cdo", ".", "getGlobalId", "(", ")", ";", "}", "return", "new", "SystemIdentityWrapper", ...
InstanceId for Entities, System.identityHashCode for ValueObjects
[ "InstanceId", "for", "Entities", "System", ".", "identityHashCode", "for", "ValueObjects" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/graph/NodeReuser.java#L78-L83
64,850
javers/javers
javers-persistence-mongo/src/main/java/org/javers/repository/mongo/MongoRepository.java
MongoRepository.prefixQuery
private static Bson prefixQuery(String fieldName, String prefix){ return Filters.regex(fieldName, "^" + RegexEscape.escape(prefix) + ".*"); }
java
private static Bson prefixQuery(String fieldName, String prefix){ return Filters.regex(fieldName, "^" + RegexEscape.escape(prefix) + ".*"); }
[ "private", "static", "Bson", "prefixQuery", "(", "String", "fieldName", ",", "String", "prefix", ")", "{", "return", "Filters", ".", "regex", "(", "fieldName", ",", "\"^\"", "+", "RegexEscape", ".", "escape", "(", "prefix", ")", "+", "\".*\"", ")", ";", ...
enables index range scan
[ "enables", "index", "range", "scan" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-persistence-mongo/src/main/java/org/javers/repository/mongo/MongoRepository.java#L354-L356
64,851
javers/javers
javers-core/src/main/java/org/javers/common/collections/Lists.java
Lists.positiveFilter
public static <T> List<T> positiveFilter(List<T> input, Predicate<T> filter) { argumentsAreNotNull(input, filter); return input.stream().filter(filter).collect(Collectors.toList()); }
java
public static <T> List<T> positiveFilter(List<T> input, Predicate<T> filter) { argumentsAreNotNull(input, filter); return input.stream().filter(filter).collect(Collectors.toList()); }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "positiveFilter", "(", "List", "<", "T", ">", "input", ",", "Predicate", "<", "T", ">", "filter", ")", "{", "argumentsAreNotNull", "(", "input", ",", "filter", ")", ";", "return", "input", "."...
returns new list with elements from input that satisfies given filter condition
[ "returns", "new", "list", "with", "elements", "from", "input", "that", "satisfies", "given", "filter", "condition" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/common/collections/Lists.java#L75-L78
64,852
javers/javers
javers-core/src/main/java/org/javers/common/collections/Lists.java
Lists.negativeFilter
public static <T> List<T> negativeFilter(List<T> input, final Predicate<T> filter) { argumentsAreNotNull(input, filter); return input.stream().filter(element -> !filter.test(element)).collect(Collectors.toList()); }
java
public static <T> List<T> negativeFilter(List<T> input, final Predicate<T> filter) { argumentsAreNotNull(input, filter); return input.stream().filter(element -> !filter.test(element)).collect(Collectors.toList()); }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "negativeFilter", "(", "List", "<", "T", ">", "input", ",", "final", "Predicate", "<", "T", ">", "filter", ")", "{", "argumentsAreNotNull", "(", "input", ",", "filter", ")", ";", "return", "in...
returns new list with elements from input that don't satisfies given filter condition
[ "returns", "new", "list", "with", "elements", "from", "input", "that", "don", "t", "satisfies", "given", "filter", "condition" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/common/collections/Lists.java#L83-L86
64,853
javers/javers
javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java
QueryBuilder.withChangedProperty
public QueryBuilder withChangedProperty(String propertyName) { Validate.argumentIsNotNull(propertyName); queryParamsBuilder.changedProperty(propertyName); return this; }
java
public QueryBuilder withChangedProperty(String propertyName) { Validate.argumentIsNotNull(propertyName); queryParamsBuilder.changedProperty(propertyName); return this; }
[ "public", "QueryBuilder", "withChangedProperty", "(", "String", "propertyName", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "propertyName", ")", ";", "queryParamsBuilder", ".", "changedProperty", "(", "propertyName", ")", ";", "return", "this", ";", "}" ]
Only snapshots which changed a given property. @see CdoSnapshot#getChanged()
[ "Only", "snapshots", "which", "changed", "a", "given", "property", "." ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java#L189-L193
64,854
javers/javers
javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java
QueryBuilder.withCommitId
public QueryBuilder withCommitId(CommitId commitId) { Validate.argumentIsNotNull(commitId); queryParamsBuilder.commitId(commitId); return this; }
java
public QueryBuilder withCommitId(CommitId commitId) { Validate.argumentIsNotNull(commitId); queryParamsBuilder.commitId(commitId); return this; }
[ "public", "QueryBuilder", "withCommitId", "(", "CommitId", "commitId", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "commitId", ")", ";", "queryParamsBuilder", ".", "commitId", "(", "commitId", ")", ";", "return", "this", ";", "}" ]
Only snapshots created in a given commit.
[ "Only", "snapshots", "created", "in", "a", "given", "commit", "." ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java#L328-L332
64,855
javers/javers
javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java
QueryBuilder.withCommitIds
public QueryBuilder withCommitIds(Collection<BigDecimal> commitIds) { Validate.argumentIsNotNull(commitIds); queryParamsBuilder.commitIds(commitIds.stream().map(CommitId::valueOf).collect(Collectors.toSet())); return this; }
java
public QueryBuilder withCommitIds(Collection<BigDecimal> commitIds) { Validate.argumentIsNotNull(commitIds); queryParamsBuilder.commitIds(commitIds.stream().map(CommitId::valueOf).collect(Collectors.toSet())); return this; }
[ "public", "QueryBuilder", "withCommitIds", "(", "Collection", "<", "BigDecimal", ">", "commitIds", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "commitIds", ")", ";", "queryParamsBuilder", ".", "commitIds", "(", "commitIds", ".", "stream", "(", ")", ".",...
Only snapshots created in given commits.
[ "Only", "snapshots", "created", "in", "given", "commits", "." ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java#L346-L350
64,856
javers/javers
javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java
QueryBuilder.toCommitId
public QueryBuilder toCommitId(CommitId commitId) { Validate.argumentIsNotNull(commitId); queryParamsBuilder.toCommitId(commitId); return this; }
java
public QueryBuilder toCommitId(CommitId commitId) { Validate.argumentIsNotNull(commitId); queryParamsBuilder.toCommitId(commitId); return this; }
[ "public", "QueryBuilder", "toCommitId", "(", "CommitId", "commitId", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "commitId", ")", ";", "queryParamsBuilder", ".", "toCommitId", "(", "commitId", ")", ";", "return", "this", ";", "}" ]
Only snapshots created before this commit or exactly in this commit.
[ "Only", "snapshots", "created", "before", "this", "commit", "or", "exactly", "in", "this", "commit", "." ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java#L355-L359
64,857
javers/javers
javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java
QueryBuilder.byAuthor
public QueryBuilder byAuthor(String author) { Validate.argumentIsNotNull(author); queryParamsBuilder.author(author); return this; }
java
public QueryBuilder byAuthor(String author) { Validate.argumentIsNotNull(author); queryParamsBuilder.author(author); return this; }
[ "public", "QueryBuilder", "byAuthor", "(", "String", "author", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "author", ")", ";", "queryParamsBuilder", ".", "author", "(", "author", ")", ";", "return", "this", ";", "}" ]
Only snapshots committed by a given author. @since 2.0
[ "Only", "snapshots", "committed", "by", "a", "given", "author", "." ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/repository/jql/QueryBuilder.java#L496-L500
64,858
javers/javers
javers-core/src/main/java/org/javers/common/reflection/ReflectionUtil.java
ReflectionUtil.classForName
public static Class<?> classForName(String className) { try { return Class.forName(className, false, Javers.class.getClassLoader()); } catch (ClassNotFoundException ex) { throw new JaversException(ex); } }
java
public static Class<?> classForName(String className) { try { return Class.forName(className, false, Javers.class.getClassLoader()); } catch (ClassNotFoundException ex) { throw new JaversException(ex); } }
[ "public", "static", "Class", "<", "?", ">", "classForName", "(", "String", "className", ")", "{", "try", "{", "return", "Class", ".", "forName", "(", "className", ",", "false", ",", "Javers", ".", "class", ".", "getClassLoader", "(", ")", ")", ";", "}"...
throws RuntimeException if class is not found
[ "throws", "RuntimeException", "if", "class", "is", "not", "found" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/common/reflection/ReflectionUtil.java#L41-L48
64,859
javers/javers
javers-core/src/main/java/org/javers/common/reflection/ReflectionUtil.java
ReflectionUtil.newInstance
public static Object newInstance(Class clazz, ArgumentResolver resolver){ Validate.argumentIsNotNull(clazz); for (Constructor constructor : clazz.getDeclaredConstructors()) { if (isPrivate(constructor) || isProtected(constructor)) { continue; } Class ...
java
public static Object newInstance(Class clazz, ArgumentResolver resolver){ Validate.argumentIsNotNull(clazz); for (Constructor constructor : clazz.getDeclaredConstructors()) { if (isPrivate(constructor) || isProtected(constructor)) { continue; } Class ...
[ "public", "static", "Object", "newInstance", "(", "Class", "clazz", ",", "ArgumentResolver", "resolver", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "clazz", ")", ";", "for", "(", "Constructor", "constructor", ":", "clazz", ".", "getDeclaredConstructors",...
Creates new instance of public or package-private class. Calls first, not-private constructor
[ "Creates", "new", "instance", "of", "public", "or", "package", "-", "private", "class", ".", "Calls", "first", "not", "-", "private", "constructor" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/common/reflection/ReflectionUtil.java#L64-L90
64,860
javers/javers
javers-core/src/main/java/org/javers/core/metamodel/type/JaversType.java
JaversType.spawn
JaversType spawn(Type baseJavaType) { try { Constructor c = this.getClass().getConstructor(Type.class); return (JaversType)c.newInstance(new Object[]{baseJavaType}); } catch (ReflectiveOperationException exception) { throw new RuntimeException("error calling Construct...
java
JaversType spawn(Type baseJavaType) { try { Constructor c = this.getClass().getConstructor(Type.class); return (JaversType)c.newInstance(new Object[]{baseJavaType}); } catch (ReflectiveOperationException exception) { throw new RuntimeException("error calling Construct...
[ "JaversType", "spawn", "(", "Type", "baseJavaType", ")", "{", "try", "{", "Constructor", "c", "=", "this", ".", "getClass", "(", ")", ".", "getConstructor", "(", "Type", ".", "class", ")", ";", "return", "(", "JaversType", ")", "c", ".", "newInstance", ...
Factory method, delegates to self constructor
[ "Factory", "method", "delegates", "to", "self", "constructor" ]
a51511be7d8bcee3e1812db8b7e69a45330b4e14
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/metamodel/type/JaversType.java#L45-L52
64,861
thorntail/thorntail
fractions/topology-webapp/src/main/java/org/wildfly/swarm/topology/webapp/runtime/TopologySSEServlet.java
TopologySSEServlet.formatMaybeIpv6
private String formatMaybeIpv6(String address) { String openBracket = "["; String closeBracket = "]"; if (address.contains(":") && !address.startsWith(openBracket) && !address.endsWith(closeBracket)) { return openBracket + address + closeBracket; } return address; ...
java
private String formatMaybeIpv6(String address) { String openBracket = "["; String closeBracket = "]"; if (address.contains(":") && !address.startsWith(openBracket) && !address.endsWith(closeBracket)) { return openBracket + address + closeBracket; } return address; ...
[ "private", "String", "formatMaybeIpv6", "(", "String", "address", ")", "{", "String", "openBracket", "=", "\"[\"", ";", "String", "closeBracket", "=", "\"]\"", ";", "if", "(", "address", ".", "contains", "(", "\":\"", ")", "&&", "!", "address", ".", "start...
This isn't very precise; org.jboss.as.network.NetworkUtils has better implementation, but that's in a private module.
[ "This", "isn", "t", "very", "precise", ";", "org", ".", "jboss", ".", "as", ".", "network", ".", "NetworkUtils", "has", "better", "implementation", "but", "that", "s", "in", "a", "private", "module", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/topology-webapp/src/main/java/org/wildfly/swarm/topology/webapp/runtime/TopologySSEServlet.java#L168-L177
64,862
thorntail/thorntail
fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/MpJwtPrincipalHandler.java
MpJwtPrincipalHandler.handleRequest
@Override public void handleRequest(HttpServerExchange exchange) throws Exception { Account account = exchange.getSecurityContext().getAuthenticatedAccount(); if (account != null && account.getPrincipal() instanceof JsonWebToken) { JsonWebToken token = (JsonWebToken)account.getPrincipal(...
java
@Override public void handleRequest(HttpServerExchange exchange) throws Exception { Account account = exchange.getSecurityContext().getAuthenticatedAccount(); if (account != null && account.getPrincipal() instanceof JsonWebToken) { JsonWebToken token = (JsonWebToken)account.getPrincipal(...
[ "@", "Override", "public", "void", "handleRequest", "(", "HttpServerExchange", "exchange", ")", "throws", "Exception", "{", "Account", "account", "=", "exchange", ".", "getSecurityContext", "(", ")", ".", "getAuthenticatedAccount", "(", ")", ";", "if", "(", "acc...
If there is a JWTAccount installed in the exchange security context, create @param exchange - the request/response exchange @throws Exception on failure
[ "If", "there", "is", "a", "JWTAccount", "installed", "in", "the", "exchange", "security", "context", "create" ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/MpJwtPrincipalHandler.java#L46-L55
64,863
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java
CommandLine.defaultOptions
public static Options defaultOptions() { return new Options( HELP, CONFIG_HELP, YAML_HELP, VERSION, PROPERTY, PROPERTIES_URL, SERVER_CONFIG, CONFIG, PROFILES, ...
java
public static Options defaultOptions() { return new Options( HELP, CONFIG_HELP, YAML_HELP, VERSION, PROPERTY, PROPERTIES_URL, SERVER_CONFIG, CONFIG, PROFILES, ...
[ "public", "static", "Options", "defaultOptions", "(", ")", "{", "return", "new", "Options", "(", "HELP", ",", "CONFIG_HELP", ",", "YAML_HELP", ",", "VERSION", ",", "PROPERTY", ",", "PROPERTIES_URL", ",", "SERVER_CONFIG", ",", "CONFIG", ",", "PROFILES", ",", ...
Default set of options
[ "Default", "set", "of", "options" ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java#L174-L187
64,864
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java
CommandLine.put
public <T> void put(Option<T> key, T value) { this.values.put(key, value); }
java
public <T> void put(Option<T> key, T value) { this.values.put(key, value); }
[ "public", "<", "T", ">", "void", "put", "(", "Option", "<", "T", ">", "key", ",", "T", "value", ")", "{", "this", ".", "values", ".", "put", "(", "key", ",", "value", ")", ";", "}" ]
Put a value under a given key. @param key The key. @param value The value. @param <T> The type of the value.
[ "Put", "a", "value", "under", "a", "given", "key", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java#L200-L202
64,865
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java
CommandLine.get
@SuppressWarnings("unchecked") public <T> T get(Option<T> key) { T v = (T) this.values.get(key); if (v == null) { v = key.defaultValue(); this.values.put(key, v); } return v; }
java
@SuppressWarnings("unchecked") public <T> T get(Option<T> key) { T v = (T) this.values.get(key); if (v == null) { v = key.defaultValue(); this.values.put(key, v); } return v; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "get", "(", "Option", "<", "T", ">", "key", ")", "{", "T", "v", "=", "(", "T", ")", "this", ".", "values", ".", "get", "(", "key", ")", ";", "if", "(", "v", "==...
Retrieve a value under a given key. @param key The key. @param <T> The type of the value. @return The previously stored value, or the default provided by key if none has been previously stored. The default will then be stored.
[ "Retrieve", "a", "value", "under", "a", "given", "key", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java#L211-L219
64,866
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java
CommandLine.applyProperties
public void applyProperties(Swarm swarm) throws IOException { URL propsUrl = get(PROPERTIES_URL); if (propsUrl != null) { Properties urlProps = new Properties(); urlProps.load(propsUrl.openStream()); for (String name : urlProps.stringPropertyNames()) { ...
java
public void applyProperties(Swarm swarm) throws IOException { URL propsUrl = get(PROPERTIES_URL); if (propsUrl != null) { Properties urlProps = new Properties(); urlProps.load(propsUrl.openStream()); for (String name : urlProps.stringPropertyNames()) { ...
[ "public", "void", "applyProperties", "(", "Swarm", "swarm", ")", "throws", "IOException", "{", "URL", "propsUrl", "=", "get", "(", "PROPERTIES_URL", ")", ";", "if", "(", "propsUrl", "!=", "null", ")", "{", "Properties", "urlProps", "=", "new", "Properties", ...
Apply properties to the system properties. <p>Applies values stored through the <code>Key.PROPERTIES</code>, <code>Key.PROPERTIES_URL</code> or <code>Key.BIND</code> options. @throws IOException If a URL is attempted to be read and fails.
[ "Apply", "properties", "to", "the", "system", "properties", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java#L325-L347
64,867
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java
CommandLine.applyConfigurations
public void applyConfigurations(Swarm swarm) throws IOException { if (get(SERVER_CONFIG) != null) { swarm.withXmlConfig(get(SERVER_CONFIG)); } if (get(CONFIG) != null) { List<URL> configs = get(CONFIG); for (URL config : configs) { swarm.withCo...
java
public void applyConfigurations(Swarm swarm) throws IOException { if (get(SERVER_CONFIG) != null) { swarm.withXmlConfig(get(SERVER_CONFIG)); } if (get(CONFIG) != null) { List<URL> configs = get(CONFIG); for (URL config : configs) { swarm.withCo...
[ "public", "void", "applyConfigurations", "(", "Swarm", "swarm", ")", "throws", "IOException", "{", "if", "(", "get", "(", "SERVER_CONFIG", ")", "!=", "null", ")", "{", "swarm", ".", "withXmlConfig", "(", "get", "(", "SERVER_CONFIG", ")", ")", ";", "}", "...
Apply configuration to the container. <p>Applies configuration from <code>Key.SERVER_CONFIG</code> and <code>Key.STAGE_CONFIG</code>.</p> @param swarm Swarm instance to configure. @throws MalformedURLException If a URL is attempted to be read and fails.
[ "Apply", "configuration", "to", "the", "container", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java#L357-L373
64,868
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java
CommandLine.apply
public void apply(Swarm swarm) throws IOException, ModuleLoadException { applyProperties(swarm); applyConfigurations(swarm); if (get(HELP)) { displayVersion(System.err); System.err.println(); displayHelp(System.err); System.exit(0); } ...
java
public void apply(Swarm swarm) throws IOException, ModuleLoadException { applyProperties(swarm); applyConfigurations(swarm); if (get(HELP)) { displayVersion(System.err); System.err.println(); displayHelp(System.err); System.exit(0); } ...
[ "public", "void", "apply", "(", "Swarm", "swarm", ")", "throws", "IOException", ",", "ModuleLoadException", "{", "applyProperties", "(", "swarm", ")", ";", "applyConfigurations", "(", "swarm", ")", ";", "if", "(", "get", "(", "HELP", ")", ")", "{", "displa...
Apply properties and configuration from the parsed commandline to a container. @param swarm The Swarm instance to apply configuration to. @throws IOException If an error occurs resolving any URL.
[ "Apply", "properties", "and", "configuration", "from", "the", "parsed", "commandline", "to", "a", "container", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java#L381-L405
64,869
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java
CommandLine.parse
public static CommandLine parse(Options options, String... args) throws Exception { return CommandLineParser.parse(options, args); }
java
public static CommandLine parse(Options options, String... args) throws Exception { return CommandLineParser.parse(options, args); }
[ "public", "static", "CommandLine", "parse", "(", "Options", "options", ",", "String", "...", "args", ")", "throws", "Exception", "{", "return", "CommandLineParser", ".", "parse", "(", "options", ",", "args", ")", ";", "}" ]
Parse an array of arguments using specific options. @param options The options to use. @param args The args to parse. @return The parsed <code>CommandLine</code>.
[ "Parse", "an", "array", "of", "arguments", "using", "specific", "options", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/cli/CommandLine.java#L468-L470
64,870
thorntail/thorntail
core/bootstrap/src/main/java/org/jboss/modules/Environment.java
Environment.getModuleResourceLoader
public static ResourceLoader getModuleResourceLoader(final String rootPath, final String loaderPath, final String loaderName) { if (Holder.JAR_FILE != null) { return new JarFileResourceLoader(loaderName, Holder.JAR_FILE, Holder.FILE_SYSTEM.getPath(rootPath, loaderPath).toString()); } ...
java
public static ResourceLoader getModuleResourceLoader(final String rootPath, final String loaderPath, final String loaderName) { if (Holder.JAR_FILE != null) { return new JarFileResourceLoader(loaderName, Holder.JAR_FILE, Holder.FILE_SYSTEM.getPath(rootPath, loaderPath).toString()); } ...
[ "public", "static", "ResourceLoader", "getModuleResourceLoader", "(", "final", "String", "rootPath", ",", "final", "String", "loaderPath", ",", "final", "String", "loaderName", ")", "{", "if", "(", "Holder", ".", "JAR_FILE", "!=", "null", ")", "{", "return", "...
Creates a new resource loader for the environment. <p> In an archive a {@link JarFileResourceLoader} is returned. Otherwise a file system based loader is returned. </p> @param rootPath the root path to the module @param loaderPath the path to the module @param loaderName the module name @return a resource loader fo...
[ "Creates", "a", "new", "resource", "loader", "for", "the", "environment", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/jboss/modules/Environment.java#L65-L70
64,871
thorntail/thorntail
fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/JWTAuthMechanism.java
JWTAuthMechanism.authenticate
@Override public AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext) { List<String> authHeaders = exchange.getRequestHeaders().get(AUTHORIZATION); if (authHeaders != null) { String bearerToken = null; for (String current :...
java
@Override public AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext) { List<String> authHeaders = exchange.getRequestHeaders().get(AUTHORIZATION); if (authHeaders != null) { String bearerToken = null; for (String current :...
[ "@", "Override", "public", "AuthenticationMechanismOutcome", "authenticate", "(", "HttpServerExchange", "exchange", ",", "SecurityContext", "securityContext", ")", "{", "List", "<", "String", ">", "authHeaders", "=", "exchange", ".", "getRequestHeaders", "(", ")", "."...
Extract the Authorization header and validate the bearer token if it exists. If it does, and is validated, this builds the org.jboss.security.SecurityContext authenticated Subject that drives the container APIs as well as the authorization layers. @param exchange - the http request exchange object @param securi...
[ "Extract", "the", "Authorization", "header", "and", "validate", "the", "bearer", "token", "if", "it", "exists", ".", "If", "it", "does", "and", "is", "validated", "this", "builds", "the", "org", ".", "jboss", ".", "security", ".", "SecurityContext", "authent...
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/JWTAuthMechanism.java#L67-L113
64,872
thorntail/thorntail
fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/JWTAuthMechanism.java
JWTAuthMechanism.extract
protected RoleGroup extract(Subject subject) { Optional<Principal> match = subject.getPrincipals() .stream() .filter(g -> g.getName().equals(SecurityConstants.ROLES_IDENTIFIER)) .findFirst(); Group rolesGroup = (Group) match.get(); RoleGroup roles ...
java
protected RoleGroup extract(Subject subject) { Optional<Principal> match = subject.getPrincipals() .stream() .filter(g -> g.getName().equals(SecurityConstants.ROLES_IDENTIFIER)) .findFirst(); Group rolesGroup = (Group) match.get(); RoleGroup roles ...
[ "protected", "RoleGroup", "extract", "(", "Subject", "subject", ")", "{", "Optional", "<", "Principal", ">", "match", "=", "subject", ".", "getPrincipals", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "g", "->", "g", ".", "getName", "(", ")",...
Extract the Roles group and return it as a RoleGroup @param subject authenticated subject @return RoleGroup from "Roles"
[ "Extract", "the", "Roles", "group", "and", "return", "it", "as", "a", "RoleGroup" ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/JWTAuthMechanism.java#L128-L136
64,873
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/container/config/ConfigViewImpl.java
ConfigViewImpl.withProperties
public ConfigViewImpl withProperties(Properties properties) { if (properties != null) { this.properties = properties; this.strategy.withProperties(properties); } return this; }
java
public ConfigViewImpl withProperties(Properties properties) { if (properties != null) { this.properties = properties; this.strategy.withProperties(properties); } return this; }
[ "public", "ConfigViewImpl", "withProperties", "(", "Properties", "properties", ")", "{", "if", "(", "properties", "!=", "null", ")", "{", "this", ".", "properties", "=", "properties", ";", "this", ".", "strategy", ".", "withProperties", "(", "properties", ")",...
Supply explicit properties object for introspection and outrespection. @param properties The properties. @return This view.
[ "Supply", "explicit", "properties", "object", "for", "introspection", "and", "outrespection", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/container/config/ConfigViewImpl.java#L61-L67
64,874
thorntail/thorntail
fractions/swagger/src/main/java/org/wildfly/swarm/swagger/runtime/SwaggerArchivePreparer.java
SwaggerArchivePreparer.getPackagesForScanning
private Set<String> getPackagesForScanning(WARArchive deployment) { final Set<String> packages = new TreeSet<>(); if (indexView != null) { DotName dotName = DotName.createSimple(Api.class.getName()); Collection<AnnotationInstance> instances = indexView.getAnnotations(dotName); ...
java
private Set<String> getPackagesForScanning(WARArchive deployment) { final Set<String> packages = new TreeSet<>(); if (indexView != null) { DotName dotName = DotName.createSimple(Api.class.getName()); Collection<AnnotationInstance> instances = indexView.getAnnotations(dotName); ...
[ "private", "Set", "<", "String", ">", "getPackagesForScanning", "(", "WARArchive", "deployment", ")", "{", "final", "Set", "<", "String", ">", "packages", "=", "new", "TreeSet", "<>", "(", ")", ";", "if", "(", "indexView", "!=", "null", ")", "{", "DotNam...
Get the packages that should be scanned by Swagger. This method attempts to determine the root packages by leveraging the IndexView of the deployment. If the IndexView is unavailable, then this method will fallback to the scanning the classes manually. @return the packages that should be scanned by Swagger.
[ "Get", "the", "packages", "that", "should", "be", "scanned", "by", "Swagger", ".", "This", "method", "attempts", "to", "determine", "the", "root", "packages", "by", "leveraging", "the", "IndexView", "of", "the", "deployment", ".", "If", "the", "IndexView", "...
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/swagger/src/main/java/org/wildfly/swarm/swagger/runtime/SwaggerArchivePreparer.java#L208-L283
64,875
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/internal/wildfly/SelfContainedContainer.java
SelfContainedContainer.stop
public void stop() throws Exception { final CountDownLatch latch = new CountDownLatch(1); this.serviceContainer.addTerminateListener(info -> latch.countDown()); this.serviceContainer.shutdown(); latch.await(); executor.submit(new Runnable() { @Override ...
java
public void stop() throws Exception { final CountDownLatch latch = new CountDownLatch(1); this.serviceContainer.addTerminateListener(info -> latch.countDown()); this.serviceContainer.shutdown(); latch.await(); executor.submit(new Runnable() { @Override ...
[ "public", "void", "stop", "(", ")", "throws", "Exception", "{", "final", "CountDownLatch", "latch", "=", "new", "CountDownLatch", "(", "1", ")", ";", "this", ".", "serviceContainer", ".", "addTerminateListener", "(", "info", "->", "latch", ".", "countDown", ...
Stops the service container and cleans up all file system resources. @throws Exception
[ "Stops", "the", "service", "container", "and", "cleans", "up", "all", "file", "system", "resources", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/internal/wildfly/SelfContainedContainer.java#L152-L167
64,876
thorntail/thorntail
fractions/microprofile/microprofile-health/src/main/java/org/wildfly/swarm/microprofile/health/deployment/HealthExtension.java
HealthExtension.beforeShutdown
public void beforeShutdown(@Observes final BeforeShutdown bs) { monitor.unregisterHealthReporter(); monitor.unregisterContextClassLoader(); reporter = null; reporterInstance.preDestroy().dispose(); reporterInstance = null; }
java
public void beforeShutdown(@Observes final BeforeShutdown bs) { monitor.unregisterHealthReporter(); monitor.unregisterContextClassLoader(); reporter = null; reporterInstance.preDestroy().dispose(); reporterInstance = null; }
[ "public", "void", "beforeShutdown", "(", "@", "Observes", "final", "BeforeShutdown", "bs", ")", "{", "monitor", ".", "unregisterHealthReporter", "(", ")", ";", "monitor", ".", "unregisterContextClassLoader", "(", ")", ";", "reporter", "=", "null", ";", "reporter...
Called when the deployment is undeployed. Remove the reporter instance of {@link SmallRyeHealthReporter} from the {@link Monitor}. Handle manually their CDI destroy lifecycle.
[ "Called", "when", "the", "deployment", "is", "undeployed", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/microprofile/microprofile-health/src/main/java/org/wildfly/swarm/microprofile/health/deployment/HealthExtension.java#L89-L95
64,877
thorntail/thorntail
arquillian/daemon/src/main/java/org/wildfly/swarm/arquillian/daemon/ContextManager.java
ContextManager.setup
void setup(final Map<String, Object> properties) { final List<SetupAction> successfulActions = new ArrayList<SetupAction>(); for (final SetupAction action : setupActions) { try { action.setup(properties); successfulActions.add(action); } catch (fin...
java
void setup(final Map<String, Object> properties) { final List<SetupAction> successfulActions = new ArrayList<SetupAction>(); for (final SetupAction action : setupActions) { try { action.setup(properties); successfulActions.add(action); } catch (fin...
[ "void", "setup", "(", "final", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "final", "List", "<", "SetupAction", ">", "successfulActions", "=", "new", "ArrayList", "<", "SetupAction", ">", "(", ")", ";", "for", "(", "final", "SetupAc...
Sets up the contexts. If any of the setup actions fail then any setup contexts are torn down, and then the exception is wrapped and thrown
[ "Sets", "up", "the", "contexts", ".", "If", "any", "of", "the", "setup", "actions", "fail", "then", "any", "setup", "contexts", "are", "torn", "down", "and", "then", "the", "exception", "is", "wrapped", "and", "thrown" ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/arquillian/daemon/src/main/java/org/wildfly/swarm/arquillian/daemon/ContextManager.java#L52-L69
64,878
thorntail/thorntail
plugins/maven/src/main/java/org/wildfly/swarm/plugin/maven/MavenArtifactResolvingHelper.java
MavenArtifactResolvingHelper.resolveDependenciesInParallel
private void resolveDependenciesInParallel(List<DependencyNode> nodes) { List<ArtifactRequest> artifactRequests = nodes.stream() .map(node -> new ArtifactRequest(node.getArtifact(), this.remoteRepositories, null)) .collect(Collectors.toList()); try { this.res...
java
private void resolveDependenciesInParallel(List<DependencyNode> nodes) { List<ArtifactRequest> artifactRequests = nodes.stream() .map(node -> new ArtifactRequest(node.getArtifact(), this.remoteRepositories, null)) .collect(Collectors.toList()); try { this.res...
[ "private", "void", "resolveDependenciesInParallel", "(", "List", "<", "DependencyNode", ">", "nodes", ")", "{", "List", "<", "ArtifactRequest", ">", "artifactRequests", "=", "nodes", ".", "stream", "(", ")", ".", "map", "(", "node", "->", "new", "ArtifactReque...
This is needed to speed up things.
[ "This", "is", "needed", "to", "speed", "up", "things", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/plugins/maven/src/main/java/org/wildfly/swarm/plugin/maven/MavenArtifactResolvingHelper.java#L222-L232
64,879
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/Swarm.java
Swarm.outboundSocketBinding
public Swarm outboundSocketBinding(String socketBindingGroup, OutboundSocketBinding binding) { this.outboundSocketBindings.add(new OutboundSocketBindingRequest(socketBindingGroup, binding)); return this; }
java
public Swarm outboundSocketBinding(String socketBindingGroup, OutboundSocketBinding binding) { this.outboundSocketBindings.add(new OutboundSocketBindingRequest(socketBindingGroup, binding)); return this; }
[ "public", "Swarm", "outboundSocketBinding", "(", "String", "socketBindingGroup", ",", "OutboundSocketBinding", "binding", ")", "{", "this", ".", "outboundSocketBindings", ".", "add", "(", "new", "OutboundSocketBindingRequest", "(", "socketBindingGroup", ",", "binding", ...
Add an outbound socket-binding to the container. <p>In the event the specified {@code socketBindingGroup} does not exist, the socket-binding will be completely ignored.</p> TODO fix the above-mentioned issue. @param socketBindingGroup The name of the socket-binding group to attach a binding to. @param binding ...
[ "Add", "an", "outbound", "socket", "-", "binding", "to", "the", "container", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/Swarm.java#L351-L354
64,880
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/Swarm.java
Swarm.socketBinding
public Swarm socketBinding(String socketBindingGroup, SocketBinding binding) { this.socketBindings.add(new SocketBindingRequest(socketBindingGroup, binding)); return this; }
java
public Swarm socketBinding(String socketBindingGroup, SocketBinding binding) { this.socketBindings.add(new SocketBindingRequest(socketBindingGroup, binding)); return this; }
[ "public", "Swarm", "socketBinding", "(", "String", "socketBindingGroup", ",", "SocketBinding", "binding", ")", "{", "this", ".", "socketBindings", ".", "add", "(", "new", "SocketBindingRequest", "(", "socketBindingGroup", ",", "binding", ")", ")", ";", "return", ...
Add an inbound socket-binding to the container. <p>In the even the specified {@code socketBindingGroup} does no exist, the socket-binding will be completely ignored.</p> TODO fix the above-mentioned issue. @param socketBindingGroup The name of the socket-binding group to attach a binding to. @param binding ...
[ "Add", "an", "inbound", "socket", "-", "binding", "to", "the", "container", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/Swarm.java#L368-L371
64,881
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/Swarm.java
Swarm.start
public Swarm start() throws Exception { INSTANCE = this; try (AutoCloseable handle = Performance.time("Thorntail.start()")) { Module module = Module.getBootModuleLoader().loadModule(CONTAINER_MODULE_NAME); Class<?> bootstrapClass = module.getClassLoader().loadClass("org.wildfly...
java
public Swarm start() throws Exception { INSTANCE = this; try (AutoCloseable handle = Performance.time("Thorntail.start()")) { Module module = Module.getBootModuleLoader().loadModule(CONTAINER_MODULE_NAME); Class<?> bootstrapClass = module.getClassLoader().loadClass("org.wildfly...
[ "public", "Swarm", "start", "(", ")", "throws", "Exception", "{", "INSTANCE", "=", "this", ";", "try", "(", "AutoCloseable", "handle", "=", "Performance", ".", "time", "(", "\"Thorntail.start()\"", ")", ")", "{", "Module", "module", "=", "Module", ".", "ge...
Start the container. <p>This is a blocking call, which guarateens that when it returns without error, the container is fully started.</p> @return The container. @throws Exception if an error occurs.
[ "Start", "the", "container", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/Swarm.java#L382-L405
64,882
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/Swarm.java
Swarm.stop
public Swarm stop() throws Exception { if (this.server == null) { throw SwarmMessages.MESSAGES.containerNotStarted("stop()"); } this.server.stop(); this.server = null; Module module = Module.getBootModuleLoader().loadModule(CONTAINER_MODULE_NAME); Class<?> ...
java
public Swarm stop() throws Exception { if (this.server == null) { throw SwarmMessages.MESSAGES.containerNotStarted("stop()"); } this.server.stop(); this.server = null; Module module = Module.getBootModuleLoader().loadModule(CONTAINER_MODULE_NAME); Class<?> ...
[ "public", "Swarm", "stop", "(", ")", "throws", "Exception", "{", "if", "(", "this", ".", "server", "==", "null", ")", "{", "throw", "SwarmMessages", ".", "MESSAGES", ".", "containerNotStarted", "(", "\"stop()\"", ")", ";", "}", "this", ".", "server", "."...
Stop the container, first undeploying all deployments. @return THe container. @throws Exception If an error occurs.
[ "Stop", "the", "container", "first", "undeploying", "all", "deployments", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/Swarm.java#L428-L444
64,883
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/Swarm.java
Swarm.deploy
public Swarm deploy() throws IllegalStateException, DeploymentException { if (this.server == null) { throw SwarmMessages.MESSAGES.containerNotStarted("deploy()"); } if (ApplicationEnvironment.get().isHollow()) { this.server.deployer().deploy( getComma...
java
public Swarm deploy() throws IllegalStateException, DeploymentException { if (this.server == null) { throw SwarmMessages.MESSAGES.containerNotStarted("deploy()"); } if (ApplicationEnvironment.get().isHollow()) { this.server.deployer().deploy( getComma...
[ "public", "Swarm", "deploy", "(", ")", "throws", "IllegalStateException", ",", "DeploymentException", "{", "if", "(", "this", ".", "server", "==", "null", ")", "{", "throw", "SwarmMessages", ".", "MESSAGES", ".", "containerNotStarted", "(", "\"deploy()\"", ")", ...
Perform a default deployment. <p>For regular uberjars, it is effectively a short-cut for {@code deploy(swarm.createDefaultDeployment())}, deploying the baked-in deployment.</p> <p>For hollow uberjars, it deploys whatever deployments were passed through the command-line, as none are baked-in.</p> @return The containe...
[ "Perform", "a", "default", "deployment", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/Swarm.java#L463-L479
64,884
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/Swarm.java
Swarm.createDefaultDeployment
public Archive<?> createDefaultDeployment() throws Exception { if (this.server == null) { throw SwarmMessages.MESSAGES.containerNotStarted("createDefaultDeployment()"); } return this.server.deployer().createDefaultDeployment(); }
java
public Archive<?> createDefaultDeployment() throws Exception { if (this.server == null) { throw SwarmMessages.MESSAGES.containerNotStarted("createDefaultDeployment()"); } return this.server.deployer().createDefaultDeployment(); }
[ "public", "Archive", "<", "?", ">", "createDefaultDeployment", "(", ")", "throws", "Exception", "{", "if", "(", "this", ".", "server", "==", "null", ")", "{", "throw", "SwarmMessages", ".", "MESSAGES", ".", "containerNotStarted", "(", "\"createDefaultDeployment(...
Retrieve the default ShrinkWrap deployment. @return The default deployment, unmodified.
[ "Retrieve", "the", "default", "ShrinkWrap", "deployment", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/Swarm.java#L502-L508
64,885
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/Swarm.java
Swarm.artifact
public static JavaArchive artifact(String gav, String asName) throws Exception { return artifactLookup().artifact(gav, asName); }
java
public static JavaArchive artifact(String gav, String asName) throws Exception { return artifactLookup().artifact(gav, asName); }
[ "public", "static", "JavaArchive", "artifact", "(", "String", "gav", ",", "String", "asName", ")", "throws", "Exception", "{", "return", "artifactLookup", "(", ")", ".", "artifact", "(", "gav", ",", "asName", ")", ";", "}" ]
Retrieve an artifact that was part of the original build using a full or simplified Maven GAV specifier, returning an archive with a specified name. @param gav The Maven GAV. @return The located artifact, as a {@code JavaArchive} with the specified name. @throws Exception If the specified artifact is not locatable. @s...
[ "Retrieve", "an", "artifact", "that", "was", "part", "of", "the", "original", "build", "using", "a", "full", "or", "simplified", "Maven", "GAV", "specifier", "returning", "an", "archive", "with", "a", "specified", "name", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/Swarm.java#L840-L842
64,886
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/Swarm.java
Swarm.installModuleMBeanServer
private void installModuleMBeanServer() { try { Method method = ModuleLoader.class.getDeclaredMethod("installMBeanServer"); method.setAccessible(true); method.invoke(null); } catch (Exception e) { SwarmMessages.MESSAGES.moduleMBeanServerNotInstalled(e); ...
java
private void installModuleMBeanServer() { try { Method method = ModuleLoader.class.getDeclaredMethod("installMBeanServer"); method.setAccessible(true); method.invoke(null); } catch (Exception e) { SwarmMessages.MESSAGES.moduleMBeanServerNotInstalled(e); ...
[ "private", "void", "installModuleMBeanServer", "(", ")", "{", "try", "{", "Method", "method", "=", "ModuleLoader", ".", "class", ".", "getDeclaredMethod", "(", "\"installMBeanServer\"", ")", ";", "method", ".", "setAccessible", "(", "true", ")", ";", "method", ...
Installs the Module MBeanServer.
[ "Installs", "the", "Module", "MBeanServer", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/Swarm.java#L857-L865
64,887
thorntail/thorntail
core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java
GradleResolver.downloadFromRemoteRepository
File downloadFromRemoteRepository(ArtifactCoordinates artifactCoordinates, String packaging, Path artifactDirectory) { String artifactRelativeHttpPath = toGradleArtifactPath(artifactCoordinates); String artifactRelativeMetadataHttpPath = artifactCoordinates.relativeMetadataPath('/'); for (String...
java
File downloadFromRemoteRepository(ArtifactCoordinates artifactCoordinates, String packaging, Path artifactDirectory) { String artifactRelativeHttpPath = toGradleArtifactPath(artifactCoordinates); String artifactRelativeMetadataHttpPath = artifactCoordinates.relativeMetadataPath('/'); for (String...
[ "File", "downloadFromRemoteRepository", "(", "ArtifactCoordinates", "artifactCoordinates", ",", "String", "packaging", ",", "Path", "artifactDirectory", ")", "{", "String", "artifactRelativeHttpPath", "=", "toGradleArtifactPath", "(", "artifactCoordinates", ")", ";", "Strin...
Download artifact from remote repository. @param artifactCoordinates @param packaging @param artifactDirectory @return
[ "Download", "artifact", "from", "remote", "repository", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java#L99-L134
64,888
thorntail/thorntail
core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java
GradleResolver.doDownload
File doDownload(String remoteRepos, String artifactAbsoluteHttpPath, String artifactRelativeHttpPath, ArtifactCoordinates artifactCoordinates, String packaging, File targetArtifactPomDirectory, File targetArtifactDirectory) { //Download POM File targetArtifactPomFile = new File(targetArtifactPomDirector...
java
File doDownload(String remoteRepos, String artifactAbsoluteHttpPath, String artifactRelativeHttpPath, ArtifactCoordinates artifactCoordinates, String packaging, File targetArtifactPomDirectory, File targetArtifactDirectory) { //Download POM File targetArtifactPomFile = new File(targetArtifactPomDirector...
[ "File", "doDownload", "(", "String", "remoteRepos", ",", "String", "artifactAbsoluteHttpPath", ",", "String", "artifactRelativeHttpPath", ",", "ArtifactCoordinates", "artifactCoordinates", ",", "String", "packaging", ",", "File", "targetArtifactPomDirectory", ",", "File", ...
Download the POM and the artifact file and return it. @param remoteRepos @param artifactAbsoluteHttpPath @param artifactRelativeHttpPath @param artifactCoordinates @param packaging @param targetArtifactPomDirectory @param targetArtifactDirectory @return
[ "Download", "the", "POM", "and", "the", "artifact", "file", "and", "return", "it", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java#L148-L170
64,889
thorntail/thorntail
core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java
GradleResolver.toGradleArtifactFileName
String toGradleArtifactFileName(ArtifactCoordinates artifactCoordinates, String packaging) { StringBuilder sbFileFilter = new StringBuilder(); sbFileFilter .append(artifactCoordinates.getArtifactId()) .append("-") .append(artifactCoordinates.getVersion());...
java
String toGradleArtifactFileName(ArtifactCoordinates artifactCoordinates, String packaging) { StringBuilder sbFileFilter = new StringBuilder(); sbFileFilter .append(artifactCoordinates.getArtifactId()) .append("-") .append(artifactCoordinates.getVersion());...
[ "String", "toGradleArtifactFileName", "(", "ArtifactCoordinates", "artifactCoordinates", ",", "String", "packaging", ")", "{", "StringBuilder", "sbFileFilter", "=", "new", "StringBuilder", "(", ")", ";", "sbFileFilter", ".", "append", "(", "artifactCoordinates", ".", ...
Build file name for artifact. @param artifactCoordinates @param packaging @return
[ "Build", "file", "name", "for", "artifact", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java#L179-L194
64,890
thorntail/thorntail
core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java
GradleResolver.toGradleArtifactPath
String toGradleArtifactPath(ArtifactCoordinates artifactCoordinates) { // e.g.: org/jboss/ws/cxf/jbossws-cxf-resources/5.1.5.Final/jbossws-cxf-resources-5.1.5.Final String pathWithMissingClassifier = artifactCoordinates.relativeArtifactPath('/'); StringBuilder sb = new StringBuilder(pathWithMiss...
java
String toGradleArtifactPath(ArtifactCoordinates artifactCoordinates) { // e.g.: org/jboss/ws/cxf/jbossws-cxf-resources/5.1.5.Final/jbossws-cxf-resources-5.1.5.Final String pathWithMissingClassifier = artifactCoordinates.relativeArtifactPath('/'); StringBuilder sb = new StringBuilder(pathWithMiss...
[ "String", "toGradleArtifactPath", "(", "ArtifactCoordinates", "artifactCoordinates", ")", "{", "// e.g.: org/jboss/ws/cxf/jbossws-cxf-resources/5.1.5.Final/jbossws-cxf-resources-5.1.5.Final", "String", "pathWithMissingClassifier", "=", "artifactCoordinates", ".", "relativeArtifactPath", ...
Build the artifact path including the classifier. @param artifactCoordinates @return
[ "Build", "the", "artifact", "path", "including", "the", "classifier", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java#L202-L215
64,891
thorntail/thorntail
core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java
GradleResolver.computeGradleUUID
String computeGradleUUID(String content) { try { MessageDigest md = MessageDigest.getInstance(MD5_ALGORITHM); md.reset(); byte[] bytes = content.trim().toLowerCase(Locale.US).getBytes("UTF-8"); md.update(bytes, 0, bytes.length); return byteArrayToHexSt...
java
String computeGradleUUID(String content) { try { MessageDigest md = MessageDigest.getInstance(MD5_ALGORITHM); md.reset(); byte[] bytes = content.trim().toLowerCase(Locale.US).getBytes("UTF-8"); md.update(bytes, 0, bytes.length); return byteArrayToHexSt...
[ "String", "computeGradleUUID", "(", "String", "content", ")", "{", "try", "{", "MessageDigest", "md", "=", "MessageDigest", ".", "getInstance", "(", "MD5_ALGORITHM", ")", ";", "md", ".", "reset", "(", ")", ";", "byte", "[", "]", "bytes", "=", "content", ...
Compute gradle uuid for artifacts. @param content @return
[ "Compute", "gradle", "uuid", "for", "artifacts", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/modules/GradleResolver.java#L223-L237
64,892
thorntail/thorntail
arquillian/gradle-adapter/src/main/java/org/wildfly/swarm/arquillian/adapter/gradle/GradleDependencyAdapter.java
GradleDependencyAdapter.getDependenciesViaIdeaModel
private DeclaredDependencies getDependenciesViaIdeaModel(ProjectConnection connection) { DeclaredDependencies declaredDependencies = new DeclaredDependencies(); // 1. Get the IdeaProject model from the Gradle connection. IdeaProject prj = connection.getModel(IdeaProject.class); prj.getM...
java
private DeclaredDependencies getDependenciesViaIdeaModel(ProjectConnection connection) { DeclaredDependencies declaredDependencies = new DeclaredDependencies(); // 1. Get the IdeaProject model from the Gradle connection. IdeaProject prj = connection.getModel(IdeaProject.class); prj.getM...
[ "private", "DeclaredDependencies", "getDependenciesViaIdeaModel", "(", "ProjectConnection", "connection", ")", "{", "DeclaredDependencies", "declaredDependencies", "=", "new", "DeclaredDependencies", "(", ")", ";", "// 1. Get the IdeaProject model from the Gradle connection.", "Ide...
Get the dependencies via the Gradle IDEA model. @param connection the Gradle project connection. @return the computed dependencies.
[ "Get", "the", "dependencies", "via", "the", "Gradle", "IDEA", "model", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/arquillian/gradle-adapter/src/main/java/org/wildfly/swarm/arquillian/adapter/gradle/GradleDependencyAdapter.java#L90-L139
64,893
thorntail/thorntail
arquillian/gradle-adapter/src/main/java/org/wildfly/swarm/arquillian/adapter/gradle/GradleDependencyAdapter.java
GradleDependencyAdapter.toArtifactSpec
private static ArtifactSpec toArtifactSpec(DependencyDescriptor desc, String scope) { return new ArtifactSpec(scope, desc.getGroup(), desc.getName(), desc.getVersion(), desc.getType(), desc.getClassifier(), desc.getFile()); }
java
private static ArtifactSpec toArtifactSpec(DependencyDescriptor desc, String scope) { return new ArtifactSpec(scope, desc.getGroup(), desc.getName(), desc.getVersion(), desc.getType(), desc.getClassifier(), desc.getFile()); }
[ "private", "static", "ArtifactSpec", "toArtifactSpec", "(", "DependencyDescriptor", "desc", ",", "String", "scope", ")", "{", "return", "new", "ArtifactSpec", "(", "scope", ",", "desc", ".", "getGroup", "(", ")", ",", "desc", ".", "getName", "(", ")", ",", ...
Translate the given dependency descriptor to the an artifact specification while overriding the scope as well. @param desc the dependency descriptor reference. @param scope the scope that needs to be set on the result. @return an artifact sepcification.
[ "Translate", "the", "given", "dependency", "descriptor", "to", "the", "an", "artifact", "specification", "while", "overriding", "the", "scope", "as", "well", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/arquillian/gradle-adapter/src/main/java/org/wildfly/swarm/arquillian/adapter/gradle/GradleDependencyAdapter.java#L197-L200
64,894
thorntail/thorntail
core/container/src/main/java/org/wildfly/swarm/container/config/ConfigResolutionStrategy.java
ConfigResolutionStrategy.activate
void activate() { nodes().flatMap(e -> e.allKeysRecursively()) .distinct() .forEach(key -> { activate(key); }); }
java
void activate() { nodes().flatMap(e -> e.allKeysRecursively()) .distinct() .forEach(key -> { activate(key); }); }
[ "void", "activate", "(", ")", "{", "nodes", "(", ")", ".", "flatMap", "(", "e", "->", "e", ".", "allKeysRecursively", "(", ")", ")", ".", "distinct", "(", ")", ".", "forEach", "(", "key", "->", "{", "activate", "(", "key", ")", ";", "}", ")", "...
Activate the strategy.
[ "Activate", "the", "strategy", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/container/src/main/java/org/wildfly/swarm/container/config/ConfigResolutionStrategy.java#L103-L109
64,895
thorntail/thorntail
core/bootstrap/src/main/java/org/jboss/modules/maven/MavenArtifactUtil.java
MavenArtifactUtil.createMavenArtifactLoader
public static ResourceLoader createMavenArtifactLoader(final MavenResolver mavenResolver, final String name) throws IOException { return createMavenArtifactLoader(mavenResolver, ArtifactCoordinates.fromString(name), name); }
java
public static ResourceLoader createMavenArtifactLoader(final MavenResolver mavenResolver, final String name) throws IOException { return createMavenArtifactLoader(mavenResolver, ArtifactCoordinates.fromString(name), name); }
[ "public", "static", "ResourceLoader", "createMavenArtifactLoader", "(", "final", "MavenResolver", "mavenResolver", ",", "final", "String", "name", ")", "throws", "IOException", "{", "return", "createMavenArtifactLoader", "(", "mavenResolver", ",", "ArtifactCoordinates", "...
A utility method to create a Maven artifact resource loader for the given artifact name. @param mavenResolver the Maven resolver to use (must not be {@code null}) @param name the artifact name @return the resource loader @throws IOException if the artifact could not be resolved
[ "A", "utility", "method", "to", "create", "a", "Maven", "artifact", "resource", "loader", "for", "the", "given", "artifact", "name", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/jboss/modules/maven/MavenArtifactUtil.java#L266-L268
64,896
thorntail/thorntail
core/bootstrap/src/main/java/org/jboss/modules/maven/MavenArtifactUtil.java
MavenArtifactUtil.createMavenArtifactLoader
public static ResourceLoader createMavenArtifactLoader(final MavenResolver mavenResolver, final ArtifactCoordinates coordinates, final String rootName) throws IOException { File fp = mavenResolver.resolveJarArtifact(coordinates); if (fp == null) return null; JarFile jarFile = JDKSpecific.getJarF...
java
public static ResourceLoader createMavenArtifactLoader(final MavenResolver mavenResolver, final ArtifactCoordinates coordinates, final String rootName) throws IOException { File fp = mavenResolver.resolveJarArtifact(coordinates); if (fp == null) return null; JarFile jarFile = JDKSpecific.getJarF...
[ "public", "static", "ResourceLoader", "createMavenArtifactLoader", "(", "final", "MavenResolver", "mavenResolver", ",", "final", "ArtifactCoordinates", "coordinates", ",", "final", "String", "rootName", ")", "throws", "IOException", "{", "File", "fp", "=", "mavenResolve...
A utility method to create a Maven artifact resource loader for the given artifact coordinates. @param mavenResolver the Maven resolver to use (must not be {@code null}) @param coordinates the artifact coordinates to use (must not be {@code null}) @param rootName the resource root name to use (must not be {@code null}...
[ "A", "utility", "method", "to", "create", "a", "Maven", "artifact", "resource", "loader", "for", "the", "given", "artifact", "coordinates", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/core/bootstrap/src/main/java/org/jboss/modules/maven/MavenArtifactUtil.java#L279-L284
64,897
thorntail/thorntail
fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/jaas/JWTLoginModule.java
JWTLoginModule.validate
protected JWTCallerPrincipal validate(JWTCredential jwtCredential) throws ParseException { JWTCallerPrincipalFactory factory = JWTCallerPrincipalFactory.instance(); JWTCallerPrincipal callerPrincipal = factory.parse(jwtCredential.getBearerToken(), jwtCredential.getAuthContextInfo()); return call...
java
protected JWTCallerPrincipal validate(JWTCredential jwtCredential) throws ParseException { JWTCallerPrincipalFactory factory = JWTCallerPrincipalFactory.instance(); JWTCallerPrincipal callerPrincipal = factory.parse(jwtCredential.getBearerToken(), jwtCredential.getAuthContextInfo()); return call...
[ "protected", "JWTCallerPrincipal", "validate", "(", "JWTCredential", "jwtCredential", ")", "throws", "ParseException", "{", "JWTCallerPrincipalFactory", "factory", "=", "JWTCallerPrincipalFactory", ".", "instance", "(", ")", ";", "JWTCallerPrincipal", "callerPrincipal", "="...
Validate the bearer token passed in with the authorization header @param jwtCredential - the input bearer token @return return the validated JWTCallerPrincipal @throws ParseException - thrown on token parse or validation failure
[ "Validate", "the", "bearer", "token", "passed", "in", "with", "the", "authorization", "header" ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/microprofile/microprofile-jwt/src/main/java/org/wildfly/swarm/microprofile/jwtauth/deployment/auth/jaas/JWTLoginModule.java#L98-L102
64,898
thorntail/thorntail
fractions/monitor/src/main/java/org/wildfly/swarm/monitor/runtime/SecureHttpContexts.java
SecureHttpContexts.secureHandler
@SuppressWarnings("deprecation") private HttpHandler secureHandler(final HttpHandler toWrap, SecurityRealm securityRealm) { HttpHandler handler = toWrap; handler = new AuthenticationCallHandler(handler); handler = new AuthenticationConstraintHandler(handler); RealmIdentityManager i...
java
@SuppressWarnings("deprecation") private HttpHandler secureHandler(final HttpHandler toWrap, SecurityRealm securityRealm) { HttpHandler handler = toWrap; handler = new AuthenticationCallHandler(handler); handler = new AuthenticationConstraintHandler(handler); RealmIdentityManager i...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "private", "HttpHandler", "secureHandler", "(", "final", "HttpHandler", "toWrap", ",", "SecurityRealm", "securityRealm", ")", "{", "HttpHandler", "handler", "=", "toWrap", ";", "handler", "=", "new", "Authenticat...
Wraps the target handler and makes it inheritSecurity. Includes a predicate for relevant web contexts.
[ "Wraps", "the", "target", "handler", "and", "makes", "it", "inheritSecurity", ".", "Includes", "a", "predicate", "for", "relevant", "web", "contexts", "." ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/monitor/src/main/java/org/wildfly/swarm/monitor/runtime/SecureHttpContexts.java#L88-L147
64,899
thorntail/thorntail
thorntail-runner/src/main/java/org/wildfly/swarm/runner/WarBuilder.java
WarBuilder.isWar
private boolean isWar(String path) { String currentDir = Paths.get(".").toAbsolutePath().normalize().toString(); String classesDirPath = Paths.get(path).toAbsolutePath().normalize().toString(); return classesDirPath.startsWith(currentDir); }
java
private boolean isWar(String path) { String currentDir = Paths.get(".").toAbsolutePath().normalize().toString(); String classesDirPath = Paths.get(path).toAbsolutePath().normalize().toString(); return classesDirPath.startsWith(currentDir); }
[ "private", "boolean", "isWar", "(", "String", "path", ")", "{", "String", "currentDir", "=", "Paths", ".", "get", "(", "\".\"", ")", ".", "toAbsolutePath", "(", ")", ".", "normalize", "(", ")", ".", "toString", "(", ")", ";", "String", "classesDirPath", ...
the assumption is that the Runner is invoked in the WAR module's directory
[ "the", "assumption", "is", "that", "the", "Runner", "is", "invoked", "in", "the", "WAR", "module", "s", "directory" ]
4a391b68ffae98c6e66d30a3bfb99dadc9509f14
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/thorntail-runner/src/main/java/org/wildfly/swarm/runner/WarBuilder.java#L89-L93