Class ProtectedDataType<T>
- java.lang.Object
-
- com.evolveum.prism.xml.ns._public.types_3.ProtectedDataType<T>
-
- All Implemented Interfaces:
ProtectedData<T>
,JaxbVisitable
,Serializable
- Direct Known Subclasses:
ProtectedByteArrayType
,ProtectedStringType
public abstract class ProtectedDataType<T> extends Object implements ProtectedData<T>, Serializable, JaxbVisitable
This class was originally generated. But it was heavily modified by hand.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTRIBUTE_XML_ENC_ALGORITHM
static QName
COMPLEX_TYPE
protected List<Object>
content
static QName
F_CLEAR_VALUE
static QName
F_ENCRYPTED_DATA
static QName
F_HASHED_DATA
static QName
F_XML_DSIG_KEY_INFO
static QName
F_XML_DSIG_KEY_NAME
static QName
F_XML_ENC_ALGORITHM
static QName
F_XML_ENC_CIPHER_DATA
static QName
F_XML_ENC_CIPHER_VALUE
static QName
F_XML_ENC_ENCRYPTED_DATA
static QName
F_XML_ENC_ENCRYPTION_METHOD
static String
NS_XML_DSIG
static String
NS_XML_ENC
-
Constructor Summary
Constructors Constructor Description ProtectedDataType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canGetCleartext()
void
clear()
ProtectedDataType<T>
clearValue(T clearValue)
protected void
cloneTo(ProtectedDataType<T> cloned)
void
destroyCleartext()
boolean
equals(Object obj)
Indicates whether some other object is "equal to" this one.T
getClearValue()
List<Object>
getContent()
TODO May be either encrypted or hashed or provided in the clear (e.g.EncryptedDataType
getEncryptedDataType()
HashedDataType
getHashedDataType()
int
hashCode()
boolean
isEmpty()
boolean
isEncrypted()
boolean
isHashed()
void
setClearValue(T clearValue)
void
setEncryptedData(EncryptedDataType encryptedDataType)
void
setHashedData(HashedDataType hashedDataType)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.prism.JaxbVisitable
accept
-
Methods inherited from interface com.evolveum.midpoint.prism.crypto.ProtectedData
canSupportType, getClearBytes, setClearBytes
-
-
-
-
Field Detail
-
COMPLEX_TYPE
public static final QName COMPLEX_TYPE
-
F_ENCRYPTED_DATA
public static final QName F_ENCRYPTED_DATA
-
F_HASHED_DATA
public static final QName F_HASHED_DATA
-
F_CLEAR_VALUE
public static final QName F_CLEAR_VALUE
-
NS_XML_ENC
public static final String NS_XML_ENC
- See Also:
- Constant Field Values
-
NS_XML_DSIG
public static final String NS_XML_DSIG
- See Also:
- Constant Field Values
-
F_XML_ENC_ENCRYPTED_DATA
public static final QName F_XML_ENC_ENCRYPTED_DATA
-
F_XML_ENC_ENCRYPTION_METHOD
public static final QName F_XML_ENC_ENCRYPTION_METHOD
-
ATTRIBUTE_XML_ENC_ALGORITHM
public static final String ATTRIBUTE_XML_ENC_ALGORITHM
- See Also:
- Constant Field Values
-
F_XML_ENC_ALGORITHM
public static final QName F_XML_ENC_ALGORITHM
-
F_XML_ENC_CIPHER_DATA
public static final QName F_XML_ENC_CIPHER_DATA
-
F_XML_ENC_CIPHER_VALUE
public static final QName F_XML_ENC_CIPHER_VALUE
-
F_XML_DSIG_KEY_INFO
public static final QName F_XML_DSIG_KEY_INFO
-
F_XML_DSIG_KEY_NAME
public static final QName F_XML_DSIG_KEY_NAME
-
-
Method Detail
-
getContent
public List<Object> getContent()
TODO May be either encrypted or hashed or provided in the clear (e.g. for debugging).This type is marked as "mixed" because it may have alternative representation where just the plaintext value is presented as the only value.
This is considered to be primitive built-in type for prism objects. Gets the value of the content property.
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
set
method for the content property.For example, to add a new item, do as follows:
getContent().add(newItem);
Objects of the following type(s) are allowed in the list
Object
String
JAXBElement
<
EncryptedDataType
>
-
getEncryptedDataType
public EncryptedDataType getEncryptedDataType()
- Specified by:
getEncryptedDataType
in interfaceProtectedData<T>
-
setEncryptedData
public void setEncryptedData(EncryptedDataType encryptedDataType)
- Specified by:
setEncryptedData
in interfaceProtectedData<T>
-
isEncrypted
public boolean isEncrypted()
- Specified by:
isEncrypted
in interfaceProtectedData<T>
-
getHashedDataType
public HashedDataType getHashedDataType()
- Specified by:
getHashedDataType
in interfaceProtectedData<T>
-
setHashedData
public void setHashedData(HashedDataType hashedDataType)
- Specified by:
setHashedData
in interfaceProtectedData<T>
-
isHashed
public boolean isHashed()
- Specified by:
isHashed
in interfaceProtectedData<T>
-
getClearValue
public T getClearValue()
- Specified by:
getClearValue
in interfaceProtectedData<T>
-
setClearValue
public void setClearValue(T clearValue)
- Specified by:
setClearValue
in interfaceProtectedData<T>
-
clearValue
public ProtectedDataType<T> clearValue(T clearValue)
-
canGetCleartext
public boolean canGetCleartext()
- Specified by:
canGetCleartext
in interfaceProtectedData<T>
-
destroyCleartext
public void destroyCleartext()
- Specified by:
destroyCleartext
in interfaceProtectedData<T>
-
clear
public void clear()
-
isEmpty
public boolean isEmpty()
-
equals
public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one. This is standard Java equality comparison. I.e. it will return true if the Java objects contain the same data. This means that both object must use the same protection mechanism (enctyption,hash), same keys must be used, ciphertext or hashes must be the same and so on. If this method returns true then obviously also the cleartext data are the same. However, if this method returns false then no information about the cleartext data can be inferred. Cleartext data may still be the same in both objects. Therefore this method is not suitable for almost any practical purpose. It is here mostly just to keep the Java interface contract.See the methods of Protector for a more practical comparison algorithms.
-
cloneTo
protected void cloneTo(ProtectedDataType<T> cloned)
-
-