Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing javadoc issues in maven release build #53

Merged
merged 7 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
/**
* Abstract cache manager for Open Banking.
*
* @param <K>
* @param <V>
* @param <K> Extended Cache Key
* @param <V> Cache Value
*/
public abstract class OpenBankingBaseCache<K extends OpenBankingBaseCacheKey, V> {

Expand All @@ -54,7 +54,7 @@ public interface OnDemandRetriever {
/**
* Initialize With unique cache name.
*
* @param cacheName
* @param cacheName unique cache name.
*/
public OpenBankingBaseCache(String cacheName) {

Expand All @@ -68,10 +68,10 @@ public OpenBankingBaseCache(String cacheName) {
/**
* Get from cache or invoke ondemand retriever and store.
*
* @param key
* @param onDemandRetriever
* @return
* @throws OpenBankingException
* @param key cache key.
* @param onDemandRetriever on demand retriever.
* @return cached object.
* @throws OpenBankingException if an error occurs while retrieving the object
*/
public V getFromCacheOrRetrieve(K key, OnDemandRetriever onDemandRetriever) throws OpenBankingException {

Expand Down Expand Up @@ -132,8 +132,8 @@ public V getFromCache(K key) {
/**
* Add Object to cache.
*
* @param key
* @param value
* @param key cache key.
* @param value cache value.
*/
public void addToCache(K key, V value) {

Expand All @@ -149,7 +149,7 @@ public void addToCache(K key, V value) {
/**
* Remove Object from Cache.
*
* @param key
* @param key cache key.
*/
public void removeFromCache(K key) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static OpenBankingConfigParser getInstance() {
*
* @param filePath Custom file path
* @return OpenBankingConfigParser object
* @Deprecated use OpenBankingConfigParser.getInstance()
* &#064;Deprecated use OpenBankingConfigParser.getInstance()
*/
@Deprecated
public static OpenBankingConfigParser getInstance(String filePath) {
Expand Down Expand Up @@ -785,7 +785,7 @@ public int getConnectionVerificationTimeout() {

/**
* Returns the retention datasource name configured in open-banking.xml.
* @return
* @return retention datasource name or empty string if nothing is configured
*/
public String getRetentionDataSourceName() {

Expand Down Expand Up @@ -1142,7 +1142,7 @@ public String getOBIdnRetrieverSandboxCertificateKid() {
/**
* JWKS Retriever Size Limit for JWS Signature Handling.
*
* @return
* @return JWKS Retriever Size Limit
*/
public String getJwksRetrieverSizeLimit() {

Expand All @@ -1153,7 +1153,7 @@ public String getJwksRetrieverSizeLimit() {
/**
* JWKS Retriever Connection Timeout for JWS Signature Handling.
*
* @return
* @return JWKS Retriever Connection Timeout
*/
public String getJwksRetrieverConnectionTimeout() {

Expand All @@ -1164,7 +1164,7 @@ public String getJwksRetrieverConnectionTimeout() {
/**
* JWKS Retriever Read Timeout for JWS Signature Handling.
*
* @return
* @return JWKS Retriever Read Timeout
*/
public String getJwksRetrieverReadTimeout() {

Expand Down Expand Up @@ -1199,7 +1199,7 @@ public boolean isJwsResponseSigningEnabled() {
/**
* Jws Request Signing allowed algorithms.
*
* @return
* @return Jws Request Signing allowed algorithms
*/
public List<String> getJwsRequestSigningAlgorithms() {

Expand All @@ -1218,7 +1218,7 @@ public List<String> getJwsRequestSigningAlgorithms() {
/**
* Jws Response Signing allowed algorithm.
*
* @return
* @return Jws Response Signing allowed algorithm
*/
public String getJwsResponseSigningAlgorithm() {

Expand Down Expand Up @@ -1459,7 +1459,7 @@ public String getFederatedIDPName() {

/**
* Method to get the value Idempotency enable configuration.
* @return
* @return Whether Idempotency is enabled or not
*/
public boolean isIdempotencyValidationEnabled() {
return getConfigElementFromKey(OpenBankingConstants.IDEMPOTENCY_IS_ENABLED) != null &&
Expand All @@ -1469,7 +1469,7 @@ public boolean isIdempotencyValidationEnabled() {

/**
* Method to get the value Idempotency allowed time configuration.
* @return
* @return Idempotency allowed time
*/
public String getIdempotencyAllowedTime() {
return getConfigElementFromKey(OpenBankingConstants.IDEMPOTENCY_ALLOWED_TIME) == null ? "1440" :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ public class ApplicationIdentityService {
* Get JWKSet for application.
* First checks to get from cache, else retrieve the JWKSet from the URL by calling
* a method in JWKRetriever
* @param applicationName
* @param jwksUrl
* @param useCache
* @param applicationName Application Name
* @param jwksUrl URL of the JWKSet
* @param useCache Use cache or not
* @return JWKSet
* @throws OpenBankingException if an error occurs while retrieving the JWKSet
*/
public JWKSet getPublicJWKSet(String applicationName, URL jwksUrl,
boolean useCache) throws OpenBankingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

/**
* Cache definition to store objects in open banking iam component implementations.
* @param <K>
* @param <V>
* @param <K> Extended Cache key
* @param <V> Cache value
*/
public class OpenBankingIdentityBaseCache<K extends OpenBankingBaseCacheKey, V> extends OpenBankingBaseCache<K, V> {

Expand All @@ -37,6 +37,7 @@ public class OpenBankingIdentityBaseCache<K extends OpenBankingBaseCacheKey, V>

/**
* Initialize with unique cache name.
* @param cacheName Unique cache name
*/
public OpenBankingIdentityBaseCache(String cacheName) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public JWKRetriever getInstance() {
/**
* Get JWK Set from remote resource retriever.
*
* @param jwksURL
* @return
* @throws IOException
* @param jwksURL jwksURL in URL format
* @return JWKSet
* @throws OpenBankingException if an error occurs while retrieving resource
*/
public JWKSet updateJWKSetFromURL(URL jwksURL) throws OpenBankingException {

Expand All @@ -105,7 +105,7 @@ public JWKSet updateJWKSetFromURL(URL jwksURL) throws OpenBankingException {
* @param jwksURL jwksURL in URL format
* @param applicationName application name as a string
* @return jwkSet
* @throws OpenBankingException
* @throws OpenBankingException if an error occurs while getting JWK set
*/
public JWKSet getJWKSet(URL jwksURL , String applicationName) throws OpenBankingException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public static Certificate getCertificate(String alias) throws KeyStoreException
* Returns Signing certificate alias at Production environment.
* @param certificateType Signing
* @return String Certificate alias
* @throws OpenBankingException
* @throws OpenBankingException when there is an exception while retrieving the alias
*/
public static Optional<String> getCertAlias(IdentityConstants.CertificateType certificateType)
throws OpenBankingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class CommonServiceProviderRetriever {
* @param clientId ClientId of the application
* @param property Property of the application
* @return the property value from SP metadata
* @throws OpenBankingException
* @throws OpenBankingException if an error occurs while retrieving the property
*/
@Generated(message = "Excluding from code coverage since it requires a service call")
public String getAppPropertyFromSPMetaData(String clientId, String property) throws OpenBankingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class AnalyticsLogsUtils {
* @param dataStream Name of the data stream to which the data belongs
* @param dataVersion Version of the data stream to which the data belongs
* @param analyticsData Data which belongs to the given data stream that needs to be logged via the given logger
* @throws OpenBankingException if an error occurs while processing the analytics data
*/
public static void addAnalyticsLogs(String logFile, String dataStream, String dataVersion, Map<String,
Object> analyticsData) throws OpenBankingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ public class CertificateUtils {
/**
* Parse the certificate content.
*
* @param content the content to be pased
* @throws OpenBankingException
* @param content the content to be passed
* @return the parsed certificate
* @throws OpenBankingException if an error occurs while parsing the certificate
*/
public static X509Certificate parseCertificate(String content) throws OpenBankingException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class JWTUtils {
* @param jwtToken jwt sent by the tpp
* @param jwtPart expected jwt part (header, body)
* @return json object containing requested jwt part
* @throws ParseException if an error occurs while parsing the jwt
*/
public static JSONObject decodeRequestJWT(String jwtToken, String jwtPart) throws ParseException {

Expand All @@ -77,6 +78,10 @@ public static JSONObject decodeRequestJWT(String jwtToken, String jwtPart) throw
* @param jwksUri endpoint displaying the key set for the signing certificates
* @param algorithm the signing algorithm for jwt
* @return true if signature is valid
* @throws ParseException if an error occurs while parsing the jwt
* @throws BadJOSEException if the jwt is invalid
* @throws JOSEException if an error occurs while processing the jwt
* @throws MalformedURLException if an error occurs while creating the URL object
*/
@Generated(message = "Excluding from code coverage since can not call this method due to external https call")
public static boolean validateJWTSignature(String jwtString, String jwksUri, String algorithm)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static Object getClassInstanceFromFQN(String classpath) {
*
* @param softwareStatement software statement (jwt) extracted from request payload
* @return software_environment
* @throws ParseException
* @throws ParseException if an error occurs while parsing the software statement
*/
public static String getSoftwareEnvironmentFromSSA(String softwareStatement) throws ParseException {

Expand Down Expand Up @@ -105,8 +105,9 @@ public static boolean isPublishableDisputeData(int statusCode) {
/**
* Method to reduce string length.
*
* @param input and maxLength for dispute data
* @return String
* @param input Input for dispute data
* @param maxLength Max length for dispute data
* @return String with reduced length
*/
public static String reduceStringLength(String input, int maxLength) {
if (StringUtils.isEmpty(input) || input.length() <= maxLength) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ public class SPQueryExecutorUtil {
/**
* Executes the given query in SP.
*
* @param appName Name of the siddhi app.
* @param query Name of the query
* @param appName Name of the siddhi app.
* @param query Name of the query
* @param spUserName Username for SP
* @param spPassword Password for SP
* @param spApiHost Hostname of the SP
* @return JSON object with result
* @throws IOException IO Exception.
* @throws ParseException Parse Exception.
* @throws IOException IO Exception.
* @throws ParseException Parse Exception.
* @throws OpenBankingException OpenBanking Exception.
*/
public static JSONObject executeQueryOnStreamProcessor(String appName, String query, String spUserName,
String spPassword, String spApiHost)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class ServiceProviderUtils {
* Get Tenant Domain String for the client id.
* @param clientId the client id of the application
* @return tenant domain of the client
* @throws OpenBankingException
* @throws OpenBankingException if an error occurs while retrieving the tenant domain
*/
@Generated(message = "Ignoring because OAuth2Util cannot be mocked with no constructors")
public static String getSpTenantDomain(String clientId) throws OpenBankingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public static OpenBankingValidator getInstance() {
/**
* Check for violations on request object. Stop at the first violation and return error.
* Validations are executed based on annotation in model of the class.
*
* @param object Object to be validated
* @return Error message if there is a violation, null otherwise
*/
public String getFirstViolation(Object object) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ public String getSearchConsentsPreparedStatement(String whereClause, boolean sho

/**
* SQL query for delete consent mapping by auth id.
* @param executeOnRetentionTables
* @return
* @param executeOnRetentionTables whether to execute on retention tables
* @return SQL query to delete consent mapping by auth id
*/
public String getDeleteConsentMappingByAuthIdPreparedStatement(boolean executeOnRetentionTables) {

Expand All @@ -166,10 +166,10 @@ public String getDeleteConsentMappingByAuthIdPreparedStatement(boolean executeOn
/**
* SQL query for get consent status audit records by consentIds.
* @param whereClause conditions
* @param shouldLimit
* @param shouldOffset
* @param fetchFromRetentionTables
* @return
* @param shouldLimit whether limit should be applied
* @param shouldOffset whether offset should be applied
* @param fetchFromRetentionTables whether to fetch from retention tables
* @return SQL query to retrieve consent status audit records by consentIds
*/
public String getConsentStatusAuditRecordsByConsentIdsPreparedStatement(String whereClause, boolean shouldLimit,
boolean shouldOffset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ public String getSearchConsentsPreparedStatement(String whereClause, boolean sho

/**
* SQL query for delete consent mapping by auth id.
* @param executeOnRetentionTables
* @return
* @param executeOnRetentionTables flag to execute on retention tables
* @return SQL query for delete consent mapping by auth id
*/
public String getDeleteConsentMappingByAuthIdPreparedStatement(boolean executeOnRetentionTables) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ public static String constructAuthSearchPreparedStatement(Map<String, String> ap

/**
* Method to construct where clause for consent status audit search condition.
* @param consentIDs
* @return
* @param consentIDs List of consent IDs
* @return Filter condition for consent status audit
*/
public static String constructConsentAuditRecordSearchPreparedStatement(ArrayList<String> consentIDs) {

Expand Down Expand Up @@ -232,8 +232,8 @@ public static TreeMap<Integer, ArrayList> determineOrderOfParamsToSet(String pre
/**
* Method to construct excluded statuses search condition.
*
* @param statusesEligibleForExpiration
* @return
* @param statusesEligibleForExpiration List of statuses eligible for expiration
* @return Filter condition for excluded statuses
*/
public static String constructStatusesEligibleForExpirationCondition(List<String> statusesEligibleForExpiration) {

Expand Down
Loading