Package com.thingworx.types.primitives
Class PasswordPrimitive
- java.lang.Object
-
- com.thingworx.types.primitives.PasswordPrimitive
-
- All Implemented Interfaces:
IPrimitiveType<PasswordPrimitive,java.lang.String>
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
,java.util.Comparator<PasswordPrimitive>
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public class PasswordPrimitive extends java.lang.Object implements IPrimitiveType<PasswordPrimitive,java.lang.String>, java.lang.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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PasswordPrimitive()
PasswordPrimitive(java.lang.String value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordPrimitive
clone()
int
compare(PasswordPrimitive v1, PasswordPrimitive v2)
int
compareTo(java.lang.Object value)
static PasswordPrimitive
convertFromObject(java.lang.Object data)
BaseTypes
getBaseType()
static java.lang.String
getDecryptedValue(java.lang.String encryptedValue)
java.lang.String
getEncryptedValue()
java.lang.Object
getSerializedValue()
java.lang.String
getStringValue()
java.lang.String
getValue()
void
setValue(java.lang.String value)
-
-
-
Constructor Detail
-
PasswordPrimitive
@ThingworxExtensionApiMethod(since={6,6}) public PasswordPrimitive()
-
PasswordPrimitive
@ThingworxExtensionApiMethod(since={6,6}) public PasswordPrimitive(java.lang.String value)
-
-
Method Detail
-
getBaseType
@ThingworxExtensionApiMethod(since={6,6}) public BaseTypes getBaseType()
- Specified by:
getBaseType
in interfaceIPrimitiveType<PasswordPrimitive,java.lang.String>
-
getValue
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getValue()
- Specified by:
getValue
in interfaceIPrimitiveType<PasswordPrimitive,java.lang.String>
-
getStringValue
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getStringValue()
- Specified by:
getStringValue
in interfaceIPrimitiveType<PasswordPrimitive,java.lang.String>
-
setValue
@ThingworxExtensionApiMethod(since={6,6}) public void setValue(java.lang.String value)
- Specified by:
setValue
in interfaceIPrimitiveType<PasswordPrimitive,java.lang.String>
-
getSerializedValue
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Object getSerializedValue() throws java.lang.Exception
- Specified by:
getSerializedValue
in interfaceIPrimitiveType<PasswordPrimitive,java.lang.String>
- Throws:
java.lang.Exception
- If an error occurs
-
getEncryptedValue
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getEncryptedValue() throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
getDecryptedValue
@ThingworxExtensionApiMethod(since={6,6}) public static java.lang.String getDecryptedValue(java.lang.String encryptedValue) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
compareTo
@ThingworxExtensionApiMethod(since={6,6}) public int compareTo(java.lang.Object value)
- Specified by:
compareTo
in interfacejava.lang.Comparable
-
compare
@ThingworxExtensionApiMethod(since={6,6}) public int compare(PasswordPrimitive v1, PasswordPrimitive v2)
- Specified by:
compare
in interfacejava.util.Comparator<PasswordPrimitive>
-
convertFromObject
@ThingworxExtensionApiMethod(since={6,6}) public static PasswordPrimitive convertFromObject(java.lang.Object data) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
clone
@ThingworxExtensionApiMethod(since={6,6}) public PasswordPrimitive clone()
- Specified by:
clone
in interfaceIPrimitiveType<PasswordPrimitive,java.lang.String>
- Overrides:
clone
in classjava.lang.Object
-
-