Package de.fraunhofer.iese.mydata.policy
Class Policy
java.lang.Object
de.fraunhofer.iese.mydata.common.MyDataEntity
de.fraunhofer.iese.mydata.policy.Policy
The Class Policy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTypically used when loading a policy from the db, it checks if it's valid or notbooleanstatic PolicyIdGets the policy.inthashCode()booleanbooleanbooleanvoidsetContent(String p) voidsetLanguageValid(boolean languageValid) Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheck
-
Constructor Details
-
Policy
public Policy()Required for JPA. -
Policy
Instantiates a new policy.- Parameters:
content- the policy
-
Policy
Deprecated.the description is part of the xml, usePolicy(String)insteadInstantiates a new policy.- Parameters:
policy- the policydescription- the description
-
-
Method Details
-
extractId
-
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
Gets the policy.- Returns:
- the policy
-
setContent
- 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
-
hashCode
public int hashCode()
-
Policy(String)instead