public virtual object execute(CommandContext commandContext) { AuthorizationManager authorizationManager = commandContext.AuthorizationManager; authorizationManager.checkCamundaAdmin(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.camunda.bpm.engine.impl.persistence.entity.PropertyManager propertyManager = commandContext.getPropertyManager(); PropertyManager propertyManager = commandContext.PropertyManager; PropertyEntity property = propertyManager.findPropertyById(name); string operation = null; if (property != null) { // update property.Value = value; operation = org.camunda.bpm.engine.history.UserOperationLogEntry_Fields.OPERATION_TYPE_UPDATE; } else { // create property = new PropertyEntity(name, value); propertyManager.insert(property); operation = org.camunda.bpm.engine.history.UserOperationLogEntry_Fields.OPERATION_TYPE_CREATE; } commandContext.OperationLogManager.logPropertyOperation(operation, Collections.singletonList(new PropertyChange("name", null, name))); return(null); }
public virtual object execute(CommandContext commandContext) { AuthorizationManager authorizationManager = commandContext.AuthorizationManager; authorizationManager.checkCamundaAdmin(); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.camunda.bpm.engine.impl.persistence.entity.PropertyManager propertyManager = commandContext.getPropertyManager(); PropertyManager propertyManager = commandContext.PropertyManager; PropertyEntity propertyEntity = propertyManager.findPropertyById(name); if (propertyEntity != null) { propertyManager.delete(propertyEntity); commandContext.OperationLogManager.logPropertyOperation(org.camunda.bpm.engine.history.UserOperationLogEntry_Fields.OPERATION_TYPE_DELETE, Collections.singletonList(new PropertyChange("name", null, name))); } return(null); }