return secRole;
}
protected CPrivilege toPrivilege(Privilege privilege) {
CPrivilege secPriv = new CPrivilege();
secPriv.setId(privilege.getId());
secPriv.setName(privilege.getName());
secPriv.setDescription(privilege.getDescription());
secPriv.setReadOnly(privilege.isReadOnly());
secPriv.setType(privilege.getType());
if (privilege.getProperties() != null && privilege.getProperties().entrySet() != null) {
for (Entry<String, String> entry : privilege.getProperties().entrySet()) {
CProperty prop = new CProperty();
prop.setKey(entry.getKey());
prop.setValue(entry.getValue());
secPriv.addProperty(prop);
}
}
return secPriv;
}