This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Commit 2c356a6e authored by Michael Breu's avatar Michael Breu 💬
Browse files

First implementation and Testing

parent 6ec1f91e
package org.codeability.sharing.plugins.api;
/**
* data to identify or authorize a user.
* @author Michael Breu
*
*/
public class UserPrincipal {
private String name;
private String gitLabAccessToken;
/**
* creates a user principal to be used in context of this api
* @param name the user name. Just for information
* @param gitLabAccessToken the gitlab access token
*/
public UserPrincipal(String name, String gitLabAccessToken) {
super();
this.name = name;
this.gitLabAccessToken = gitLabAccessToken;
}
public UserPrincipal() {
// JSON
}
/**
* @return an informative name of the user
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the oAuth2 access token of the current user. This may be used to load permissions.
*/
public String getGitLabAccessToken() {
return gitLabAccessToken;
}
/**
* @param gitLabAccessToken the gitLabAccessToken to set
*/
public void setGitLabAccessToken(String gitLabAccessToken) {
this.gitLabAccessToken = gitLabAccessToken;
}
}
......@@ -38,7 +38,13 @@ public class SearchInputDTO {
return metadata;
}
public List<String> getSelectedRepository() {
/**
* @param metadata the metadata to set
*/
public void setMetadata(SearchInputMetadataDTO metadata) {
this.metadata = metadata;
}
public List<String> getSelectedRepository() {
return selectedRepository;
}
......
package org.codeability.sharing.plugins.api.search;
import org.codeability.sharing.plugins.api.UserPrincipal;
/**
* this class is combining credentials and the search query.
* @author Michael Breu
*
*/
public class SearchRequestDTO {
private UserPrincipal userPrincipal;
private SearchInputDTO query;
public SearchRequestDTO(UserPrincipal userPrincipal, SearchInputDTO query) {
super();
this.userPrincipal = userPrincipal;
this.query = query;
}
public SearchRequestDTO() {
// JSON
}
/**
* @return the query
*/
public SearchInputDTO getQuery() {
return query;
}
/**
* @param query the query to set
*/
public void setQuery(SearchInputDTO query) {
this.query = query;
}
/**
* @return the userPrincipal
*/
public UserPrincipal getUserPrincipal() {
return userPrincipal;
}
/**
* @param userPrincipal the userPrincipal to set
*/
public void setUserPrincipal(UserPrincipal userPrincipal) {
this.userPrincipal = userPrincipal;
}
}
a8a60098e74fe26a14bda5c2062a2bbd
\ No newline at end of file
c74d8e157cc64b1e594bf05bbe6353fc
\ No newline at end of file
8bda98532a548888eb075c3e54dc1ee8f7856193
\ No newline at end of file
a8ec92d78a3371e91851090ebabd4577f30c6cfa
\ No newline at end of file
......@@ -10,6 +10,6 @@
<version>0.1.0</version>
<version>0.1.0-Snapshot</version>
</versions>
<lastUpdated>20210427094233</lastUpdated>
<lastUpdated>20210427143850</lastUpdated>
</versioning>
</metadata>
70a818c6a44a58aaee1cb8881a372013
\ No newline at end of file
8f77db05c19493d61132b2c94f986dd9
\ No newline at end of file
df06509de9f4521c107b0c44bf75390f208f2bcf
\ No newline at end of file
465017dae6d11028ad524f1dd23d45ee08be23ab
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment