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.facets.object.immutable; 021 022import org.apache.isis.core.metamodel.facetapi.FacetHolder; 023import org.apache.isis.core.metamodel.facets.WhenValueFacet; 024import org.apache.isis.core.metamodel.facets.ebc.EqualByContentFacet; 025import org.apache.isis.core.metamodel.facets.object.value.ValueFacet; 026import org.apache.isis.core.metamodel.interactions.DisablingInteractionAdvisor; 027import org.apache.isis.core.metamodel.spec.ObjectSpecification; 028import org.apache.isis.core.metamodel.spec.feature.ObjectMember; 029 030/** 031 * Indicates that the instances of this class are immutable and so may not be 032 * modified either through the viewer or indeed programmatically. 033 * 034 * <p> 035 * In the standard Apache Isis Programming Model, typically corresponds to 036 * applying the <tt>@Immutable</tt> annotation at the class level. 037 * 038 * @see EqualByContentFacet 039 * @see ValueFacet 040 */ 041public interface ImmutableFacet extends WhenValueFacet, DisablingInteractionAdvisor { 042 043 /** 044 * Clone this facet onto another {@link FacetHolder}. 045 * 046 * <p> 047 * Introduced to allow this facet to be installed onto the 048 * {@link ObjectSpecification}, and then copied down onto each of the spec's 049 * {@link ObjectMember}s. 050 */ 051 void copyOnto(FacetHolder holder); 052 053}