protected override void Verify() { if (!Applies(Response)) { return; } AstoriaRequest request = Response.Request; ResourceProperty property = request.GetPropertyFromQuery(); if (property == null) { RequestUtil.GetAndVerifyStatusCode(Response.Workspace, request.URI, System.Net.HttpStatusCode.NotFound); } else { if (property.IsNavigation && property.OtherAssociationEnd.Multiplicity != Multiplicity.One) { RequestUtil.GetAndVerifyStatusCode(Response.Workspace, request.URI, System.Net.HttpStatusCode.NoContent); } else { // TODO: is this always right if its not a nav prop? RequestUtil.GetAndVerifyStatusCode(Response.Workspace, request.URI, System.Net.HttpStatusCode.NotFound); } } }
public void OverrideIsOpenType(ResourceType type, bool value) { type.Facets.IsOpenType = value; RequestUtil.GetAndVerifyStatusCode(this, this.ServiceUri + "/SetIsOpenType?resourceTypeName='" + this.ContextNamespace + "." + type.Name + "'&value=" + value.ToString().ToLowerInvariant(), System.Net.HttpStatusCode.NoContent); }
public override void RestoreData() { if (this.Settings.SkipDataPopulation) { return; } RequestUtil.GetAndVerifyStatusCode(this, this.ServiceUri + "/RestoreData", HttpStatusCode.NoContent); }