Package io.jenkins.plugins.ksm.notation
Class KsmTestNotation
- java.lang.Object
-
- io.jenkins.plugins.ksm.notation.KsmNotation
-
- io.jenkins.plugins.ksm.notation.KsmTestNotation
-
public class KsmTestNotation extends KsmNotation
-
-
Field Summary
-
Fields inherited from class io.jenkins.plugins.ksm.notation.KsmNotation
notationPrefix
-
-
Constructor Summary
Constructors Constructor Description KsmTestNotation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTestData(String jsonString)
This method will add test data.byte[]
downloadDataFile(com.keepersecurity.secretsManager.core.KeeperFile file)
com.keepersecurity.secretsManager.core.KeeperSecrets
getNotationSecrets(com.keepersecurity.secretsManager.core.SecretsManagerOptions options, List<String> uids)
static boolean
hasDataFile()
void
loadJsonData()
static void
removeJsonData()
void
writeJsonData(String jsonString)
-
-
-
Method Detail
-
addTestData
public void addTestData(String jsonString)
This method will add test data. It takes a JSON structure which it will turn into KeeperSecrets. To be perfectly honest, this is just overkill for one project. Right now it's limited to the Login and Password fields, but can be expanded. { "secrets": [ { "uid": "XXXXX", "title": "My Title", "type": "login", "note": "Some note", "fields": [ { "label": "Field Label", "fieldType": "Login", "values": ["MY_LOGIN"] } ], "files": [ { "name": "File name and title", "data": "BASE64" } ] } ] }- Parameters:
jsonString
- The JSON string
-
getNotationSecrets
public com.keepersecurity.secretsManager.core.KeeperSecrets getNotationSecrets(com.keepersecurity.secretsManager.core.SecretsManagerOptions options, List<String> uids)
- Overrides:
getNotationSecrets
in classKsmNotation
-
downloadDataFile
public byte[] downloadDataFile(com.keepersecurity.secretsManager.core.KeeperFile file)
- Overrides:
downloadDataFile
in classKsmNotation
-
writeJsonData
public void writeJsonData(String jsonString)
-
hasDataFile
public static boolean hasDataFile()
-
loadJsonData
public void loadJsonData() throws IOException
- Throws:
IOException
-
removeJsonData
public static void removeJsonData()
-
-