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 */ 019 020package org.apache.isis.core.metamodel.spec.feature; 021 022import org.apache.isis.core.metamodel.adapter.ObjectAdapter; 023 024/** 025 * Mix-in interface for {@link ObjectAction}s that reference or otherwise 026 * contain a 'current' value that moreover can be changed. 027 * 028 * <p> 029 * Examples include {@link OneToOneAssociation properties} and 030 * {@link OneToOneActionParameter action parameter}s (but not 031 * {@link ObjectAction action}s themselves) nor {@link OneToManyAssociation 032 * collection}s. 033 */ 034public interface MutableCurrentHolder extends CurrentHolder { 035 036 /** 037 * Updates the referenced {@link ObjectAdapter} for the owning 038 * {@link ObjectAdapter} with the new value provided, or clears the 039 * reference if null. 040 * 041 * <p> 042 * For example, if this is a {@link OneToOneAssociation}, then updates the 043 * object referenced . 044 * 045 * @param owner 046 * @param newValue 047 * - the new value, or <tt>null</tt> 048 */ 049 void set(final ObjectAdapter owner, final ObjectAdapter newValue); 050 051}