Skip to content

Commit

Permalink
Fix elide-model-config javadoc warnings (#1972)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Klish <[email protected]>
  • Loading branch information
rishi-aga and aklish authored Mar 29, 2021
1 parent 6feae4c commit 2be6ef0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ public static String formatFilePath(String basePath) {

/**
* converts variables hjson string to map of variables.
* @param config
* @param config HJSON file content.
* @param schemaValidator JSON schema validator.
* @return Map of Variables
* @throws IOException
* @throws IOException If an I/O error or a processing error occurs.
*/
@SuppressWarnings("unchecked")
public static Map<String, Object> stringToVariablesPojo(String fileName, String config,
Expand All @@ -80,7 +80,7 @@ public static Map<String, Object> stringToVariablesPojo(String fileName, String
* @param variables : variables to resolve.
* @param schemaValidator JSON schema validator.
* @return ElideTableConfig Pojo
* @throws IOException
* @throws IOException If an I/O error or a processing error occurs.
*/
public static ElideTableConfig stringToElideTablePojo(String fileName, String content,
Map<String, Object> variables, DynamicConfigSchemaValidator schemaValidator) throws IOException {
Expand All @@ -103,7 +103,7 @@ public static ElideTableConfig stringToElideTablePojo(String fileName, String co
* @param variables : variables to resolve.
* @param schemaValidator JSON schema validator.
* @return ElideDBConfig Pojo
* @throws IOException
* @throws IOException If an I/O error or a processing error occurs.
*/
public static ElideDBConfig stringToElideDBConfigPojo(String fileName, String content,
Map<String, Object> variables, DynamicConfigSchemaValidator schemaValidator) throws IOException {
Expand All @@ -126,7 +126,7 @@ public static ElideDBConfig stringToElideDBConfigPojo(String fileName, String co
* @param variables : variables to resolve.
* @param schemaValidator JSON schema validator.
* @return ElideSecurityConfig Pojo
* @throws IOException
* @throws IOException If an I/O error or a processing error occurs.
*/
public static ElideSecurityConfig stringToElideSecurityPojo(String fileName, String content,
Map<String, Object> variables, DynamicConfigSchemaValidator schemaValidator) throws IOException {
Expand All @@ -147,7 +147,7 @@ public static ElideSecurityConfig stringToElideSecurityPojo(String fileName, Str
* @param jsonConfig of table or security
* @param variables map from config
* @return json string with resolved variables
* @throws IOException
* @throws IOException If an I/O error or a processing error occurs.
*/
public static String resolveVariables(String jsonConfig, Map<String, Object> variables) throws IOException {
HandlebarsHydrator hydrator = new HandlebarsHydrator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public DynamicConfigSchemaValidator() {

/**
* Verify config against schema.
* @param configType
* @param jsonConfig
* @param fileName
* @param configType {@link Config} type.
* @param jsonConfig HJSON file content as JSON string.
* @param fileName Name of HJSON file.
* @return whether config is valid
* @throws IOException
* @throws ProcessingException
* @throws IOException If an I/O error occurs.
* @throws ProcessingException If a processing error occurred during validation.
*/
public boolean verifySchema(Config configType, String jsonConfig, String fileName)
throws IOException, ProcessingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public String getDescription() {

/**
* Checks if this dimension has provided argument.
* @param argName
* @param argName Name of the {@link Argument} to check for.
* @return true if this dimension has provided argument.
*/
public boolean hasArgument(String argName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public String getDescription() {

/**
* Checks if this measure has provided argument.
* @param argName
* @param argName Name of the {@link Argument} to check for.
* @return true if this measure has provided argument.
*/
public boolean hasArgument(String argName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public String getDescription() {

/**
* Checks if this model has provided field.
* @param fieldName
* @param fieldName Name of the {@link Dimension} or {@link Measure} to check for.
* @return true if this model has provided field.
*/
public boolean hasField(String fieldName) {
Expand All @@ -137,7 +137,7 @@ public boolean hasField(String fieldName) {

/**
* Provides the Field details for provided field name.
* @param fieldName
* @param fieldName Name of {@link Dimension} or {@link Measure} to retrieve.
* @return Field for provided field name.
*/
public Named getField(String fieldName) {
Expand All @@ -149,7 +149,7 @@ public Named getField(String fieldName) {

/**
* Checks if this model has provided argument.
* @param argName
* @param argName Name of the {@link Argument} to check for.
* @return true if this model has provided argument.
*/
public boolean hasArgument(String argName) {
Expand All @@ -158,7 +158,7 @@ public boolean hasArgument(String argName) {

/**
* Checks if this model has provided join field.
* @param joinName
* @param joinName Name of the {@link Join} to check for.
* @return true if this model has provided join field.
*/
public boolean hasJoinField(String joinName) {
Expand All @@ -167,7 +167,7 @@ public boolean hasJoinField(String joinName) {

/**
* Provides the Join details for provided join name.
* @param joinName
* @param joinName Name of the {@link Join} to retrieve.
* @return Join for provided join name.
*/
public Join getJoin(String joinName) {
Expand All @@ -187,7 +187,7 @@ public boolean hasParent() {

/**
* Provides the parent model for this model.
* @param elideTableConfig
* @param elideTableConfig {@link ElideTableConfig}
* @return Parent model for this model
*/
public Table getParent(ElideTableConfig elideTableConfig) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,9 @@ private static void printHelp(Options options) {
}

/**
* Remove src/.../resources/ from filepath.
* @param filePath
* @return Path to model dir
* Remove src/.../resources/ from class path for configs directory.
* @param filePath class path for configs directory.
* @return formatted class path for configs directory.
*/
public static String formatClassPath(String filePath) {
if (filePath.indexOf(RESOURCES + "/") > -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ public static void main(String[] args) {
* @param signature : file containing signature
* @param publicKey : public key name
* @return whether the file can be verified by given key and signature
* @throws NoSuchAlgorithmException
* @throws InvalidKeyException
* @throws SignatureException
* @throws NoSuchAlgorithmException If no Provider supports a Signature implementation for the SHA256withRSA
* algorithm.
* @throws InvalidKeyException If the {@code publicKey} is invalid.
* @throws SignatureException If Signature object is not initialized properly.
*/
public static boolean verify(String fileContent, String signature, PublicKey publicKey)
throws NoSuchAlgorithmException, InvalidKeyException, SignatureException {
Expand All @@ -101,8 +102,8 @@ public static boolean verify(String fileContent, String signature, PublicKey pub
* Read Content of all files.
* @param archiveFile : tar.gz file path
* @return appended content of all files in tar
* @throws FileNotFoundException
* @throws IOException
* @throws FileNotFoundException If {@code archiveFile} does not exist.
* @throws IOException If an I/O error occurs.
*/
public static String readTarContents(String archiveFile) throws FileNotFoundException, IOException {
StringBuffer sb = new StringBuffer();
Expand Down

0 comments on commit 2be6ef0

Please sign in to comment.