add a list of namespace URIs for properties, which should be always editable for a frozen node

This commit is contained in:
Rodica Sutu
2019-11-01 09:51:48 +02:00
parent cb9bc19465
commit c33e703be9
3 changed files with 35 additions and 1 deletions

View File

@@ -45,6 +45,29 @@ public class PropertyModificationAllowedCheck
* List of qnames that can be modified
*/
private List<QName> whiteList;
/**
* List of model URI's for which the properties can be updated
*/
private List<String> editableURIs;
/**
* Setter for list of model URI's
* @param editableURIs List<String>
*/
public void setEditableURIs(List<String> editableURIs)
{
this.editableURIs = editableURIs;
}
/**
* Getter for list of model URI's
* @return return the list of model URI's
*/
public List<String> getEditableURIs()
{
return editableURIs;
}
/**
* Setter for list of qnames
@@ -93,7 +116,7 @@ public class PropertyModificationAllowedCheck
if (before.get(key) != null && after.get(key) != null && !(after.get(key).equals(before.get(key))))
{
//Property modified check to see if allowed
proceed = whiteList.contains(key);
proceed = whiteList.contains(key) || getEditableURIs().contains(key.getNamespaceURI());
if (!proceed)
{
break;
@@ -103,4 +126,5 @@ public class PropertyModificationAllowedCheck
return proceed;
}
}