Package com.thingworx.types.primitives
Class PasswordPrimitive
java.lang.Object
com.thingworx.types.primitives.PasswordPrimitive
- All Implemented Interfaces:
IPrimitiveType<PasswordPrimitive,
,String> Serializable
,Cloneable
,Comparable
,Comparator<PasswordPrimitive>
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public class PasswordPrimitive
extends Object
implements IPrimitiveType<PasswordPrimitive,String>, Cloneable
A primitive that represents a password. This primitive uses symmetric encryption to keep an encrypted value in memory. When a plain text
password is set we will encrypt using the AES key stored in our secret provider. Any calls to retrieve the plain text password will
decrypt the password using the AES key in our secret provider.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
int
static PasswordPrimitive
convertFromObject
(Object data) static String
getDecryptedValue
(String encryptedValue) getValue()
void
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
PasswordPrimitive
-
PasswordPrimitive
-
-
Method Details
-
getBaseType
- Specified by:
getBaseType
in interfaceIPrimitiveType<PasswordPrimitive,
String>
-
getValue
- Specified by:
getValue
in interfaceIPrimitiveType<PasswordPrimitive,
String>
-
getStringValue
- Specified by:
getStringValue
in interfaceIPrimitiveType<PasswordPrimitive,
String>
-
setValue
- Specified by:
setValue
in interfaceIPrimitiveType<PasswordPrimitive,
String>
-
getSerializedValue
- Specified by:
getSerializedValue
in interfaceIPrimitiveType<PasswordPrimitive,
String> - Throws:
Exception
- If an error occurs
-
getEncryptedValue
- Throws:
Exception
- If an error occurs
-
getDecryptedValue
@ThingworxExtensionApiMethod(since={6,6}) public static String getDecryptedValue(String encryptedValue) throws Exception - Throws:
Exception
- If an error occurs
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
compare
@ThingworxExtensionApiMethod(since={6,6}) public int compare(PasswordPrimitive v1, PasswordPrimitive v2) - Specified by:
compare
in interfaceComparator<PasswordPrimitive>
-
convertFromObject
@ThingworxExtensionApiMethod(since={6,6}) public static PasswordPrimitive convertFromObject(Object data) throws Exception - Throws:
Exception
- If an error occurs
-
clone
- Specified by:
clone
in interfaceIPrimitiveType<PasswordPrimitive,
String> - Overrides:
clone
in classObject
-