Package de.fraunhofer.iese.mydata.policy
Class Policy
- java.lang.Object
-
- de.fraunhofer.iese.mydata.common.MyDataEntity
-
- de.fraunhofer.iese.mydata.policy.Policy
-
@Entity public class Policy extends MyDataEntity
The Class Policy.
-
-
Constructor Summary
Constructors Constructor Description Policy()
Required for JPA.Policy(java.lang.String content)
Instantiates a new policy.Policy(java.lang.String content, java.lang.String description)
Deprecated.the description is part of the xml, usePolicy(String)
instead
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doInternalValidation()
Typically used when loading a policy from the db, it checks if it's valid or notboolean
equals(java.lang.Object o)
static PolicyId
extractId(java.lang.String policy)
java.lang.String
getContent()
Gets the policy.int
hashCode()
boolean
isLanguageValid()
boolean
isSolutionAndComponentsValid()
boolean
isXmlValid()
void
setContent(java.lang.String p)
void
setLanguageValid(boolean languageValid)
-
Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheck
-
-
-
-
Constructor Detail
-
Policy
public Policy()
Required for JPA.
-
Policy
public Policy(java.lang.String content)
Instantiates a new policy.- Parameters:
content
- the policy
-
Policy
@Deprecated public Policy(java.lang.String content, java.lang.String description)
Deprecated.the description is part of the xml, usePolicy(String)
insteadInstantiates a new policy.- Parameters:
policy
- the policydescription
- the description
-
-
Method Detail
-
extractId
public static PolicyId extractId(java.lang.String policy)
-
isSolutionAndComponentsValid
public boolean isSolutionAndComponentsValid()
-
isLanguageValid
public boolean isLanguageValid()
- Returns:
- the languageValid
-
setLanguageValid
public void setLanguageValid(boolean languageValid)
- Parameters:
languageValid
- the languageValid to set
-
isXmlValid
public boolean isXmlValid()
-
getContent
public java.lang.String getContent()
Gets the policy.- Returns:
- the policy
-
setContent
public void setContent(java.lang.String p)
- Parameters:
p
- the MYDATA Policy as String
-
doInternalValidation
public void doInternalValidation()
Typically used when loading a policy from the db, it checks if it's valid or not
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-