@Override protected IEditorCommandResult concreteDoCommand() { EntityClass theClass = this._domain.getEntityClassWithId(this._classId); EntityEventSpecification theSpec = theClass.getEventSpecificationWithId(this._specId); theSpec.removeEventParamWithId(this._paramId); return new SuccessfulEditorCommand(); }
@Override public IEditorCommandResult canDoCommand() { if (!this._domain.hasEntityClassWithId(this._classId)) { return BaseEditorCommand.failWhenClassNotFound(this._classId); } EntityClass theClass = this._domain.getEntityClassWithId(this._classId); if (!theClass.hasEventSpecificationWithId(this._specId)) { return BaseEditorCommand.failWhenSpecNotFound(this._classId, this._specId); } EntityEventSpecification theSpec = theClass.getEventSpecificationWithId(this._specId); if (!theSpec.hasParamWithId(this._paramId)) { return BaseEditorCommand.failWhenParamNotFound(this._paramId); } return new SuccessfulEditorCommand(); }