gresockj commented on a change in pull request #5206:
URL: https://github.com/apache/nifi/pull/5206#discussion_r674847496



##########
File path: 
nifi-commons/nifi-sensitive-property-provider/src/main/java/org/apache/nifi/properties/AbstractSensitivePropertyProvider.java
##########
@@ -47,4 +47,34 @@ public String getName() {
     public String getIdentifierKey() {
         return getProtectionScheme().getIdentifier();
     }
+
+    @Override
+    public String protect(final String unprotectedValue, final 
ProtectedPropertyContext context) throws SensitivePropertyProtectionException {
+        return protect(unprotectedValue);
+    }
+
+    @Override
+    public String unprotect(final String protectedValue, final 
ProtectedPropertyContext context) throws SensitivePropertyProtectionException {
+        return unprotect(protectedValue);
+    }
+
+    /**
+     * Allows implementing classes to provide an implementation that does not 
require a context.
+     * @param unprotectedValue The unprotected value
+     * @return The protected value
+     * @throws SensitivePropertyProtectionException If there was a problem 
protecting the value
+     */
+    protected String protect(final String unprotectedValue) throws 
SensitivePropertyProtectionException {
+        return null;
+    }
+
+    /**
+     * Allows implementing classes to provide an implementation that does not 
require a context.
+     * @param protectedValue The protected value
+     * @return The unprotected value
+     * @throws SensitivePropertyProtectionException If there was a problem 
unprotecting the value
+     */
+    protected String unprotect(final String protectedValue) throws 
SensitivePropertyProtectionException {
+        return null;
+    }

Review comment:
       My thought was that an SPP would implement either the 1-arg or 2-arg 
version.  If this was abstract, SPPs that intended to only implement the 2-arg 
version would be forced to provide a no-op implementation of the 1-arg version.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to