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