This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config editor: adding javadoc for config editor core (#821)
* adding javadoc for config editor core * adding more comments * fixes based on the review * fixing typos
- Loading branch information
1 parent
7be2029
commit 8d8e447
Showing
64 changed files
with
1,272 additions
and
72 deletions.
There are no files selected for viewing
16 changes: 15 additions & 1 deletion
16
...core/src/main/java/uk/co/gresearch/siembol/configeditor/common/AuthorisationProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
package uk.co.gresearch.siembol.configeditor.common; | ||
|
||
/** | ||
* An object for providing authorisation for Siembol services | ||
* | ||
* <p>This interface is for providing authorisation for a Siembol service. | ||
* It decides whether the user is allowed to access a service under its role. | ||
* | ||
* @author Marian Novotny | ||
* | ||
*/ | ||
public interface AuthorisationProvider { | ||
enum AuthorisationResult { | ||
UNDEFINED, | ||
ALLOWED, | ||
FORBIDDEN, | ||
} | ||
|
||
/** | ||
* Gets authorisation decision for a user and a service | ||
* @param user a user info object | ||
* @param serviceName the name of teh service | ||
* @return the authorisation result | ||
*/ | ||
AuthorisationResult getUserAuthorisation(UserInfo user, String serviceName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 29 additions & 1 deletion
30
...editor-core/src/main/java/uk/co/gresearch/siembol/configeditor/common/ConfigImporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,37 @@ | ||
package uk.co.gresearch.siembol.configeditor.common; | ||
|
||
import uk.co.gresearch.siembol.configeditor.model.ConfigEditorResult; | ||
|
||
/** | ||
* An object for importing configurations | ||
* | ||
* <p>This interface is for providing functionality for importing open standard configuration into Siembol. | ||
* Moreover, it validates attributes and provides importer attributes schema. | ||
* | ||
* @author Marian Novotny | ||
* | ||
*/ | ||
public interface ConfigImporter { | ||
/** | ||
* Gets a json schema for importer attributes | ||
* @return config editor result with json schema | ||
*/ | ||
ConfigEditorResult getImporterAttributesSchema(); | ||
|
||
/** | ||
* Validates importer attributes | ||
* @param attributes a json string with importer attributes | ||
* @return config editor result with OK status code if the attributes are valid, otherwise | ||
* the result with ERROR status. | ||
*/ | ||
ConfigEditorResult validateImporterAttributes(String attributes); | ||
|
||
/** | ||
* Imports open standard configuration into Siembol syntax | ||
* @param user a user info object | ||
* @param importerAttributes a json string with importer attributes | ||
* @param configuration configuration for importing into Siembol | ||
* @return config editor result with OK status code and the imported config if the import was successful, otherwise | ||
* the result with ERROR status. | ||
*/ | ||
ConfigEditorResult importConfig(UserInfo user, String importerAttributes, String configuration); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
...editor-core/src/main/java/uk/co/gresearch/siembol/configeditor/common/ConfigInfoType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.