001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.isis.viewer.restfulobjects.rendering.domainobjects; 020 021import org.apache.isis.core.metamodel.facetapi.Facet; 022import org.apache.isis.viewer.restfulobjects.applib.Rel; 023import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod; 024 025public class MutatorSpec { 026 027 public static MutatorSpec of(final Rel rel, final Class<? extends Facet> validationFacetType, final Class<? extends Facet> mutatorFacetType, final RestfulHttpMethod httpMethod, final BodyArgs argSpec) { 028 return of(rel, validationFacetType, mutatorFacetType, httpMethod, argSpec, null); 029 } 030 031 public static MutatorSpec of(final Rel rel, final Class<? extends Facet> validationFacetType, final Class<? extends Facet> mutatorFacetType, final RestfulHttpMethod httpMethod, final BodyArgs argSpec, final String suffix) { 032 return new MutatorSpec(rel, validationFacetType, mutatorFacetType, httpMethod, argSpec, suffix); 033 } 034 035 public final Rel rel; 036 public final Class<? extends Facet> validationFacetType; 037 public final Class<? extends Facet> mutatorFacetType; 038 public final RestfulHttpMethod httpMethod; 039 public final String suffix; 040 public final BodyArgs arguments; 041 042 private MutatorSpec(final Rel rel, final Class<? extends Facet> validationFacetType, final Class<? extends Facet> mutatorFacetType, final RestfulHttpMethod httpMethod, final BodyArgs bodyArgs, final String suffix) { 043 this.rel = rel; 044 this.validationFacetType = validationFacetType; 045 this.mutatorFacetType = mutatorFacetType; 046 this.httpMethod = httpMethod; 047 this.arguments = bodyArgs; 048 this.suffix = suffix; 049 } 050 051}