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.commons.scxml2.model; 018 019/** 020 * The class in this SCXML object model that corresponds to the 021 * <onentry> SCXML element, which is an optional property 022 * holding executable content to be run upon entering the parent 023 * State or Parallel. 024 * 025 */ 026public class OnEntry extends Executable { 027 028 /** 029 * Serial version UID. 030 */ 031 private static final long serialVersionUID = 1L; 032 033 /** 034 * An indicator whether to raise the non-standard "entry.state.id" internal event after executing this OnEntry 035 */ 036 private Boolean raiseEvent; 037 038 /** 039 * Constructor. 040 */ 041 public OnEntry() { 042 super(); 043 } 044 045 /** 046 * Set the EnterableState parent. 047 * 048 * @param parent The parent to set. 049 */ 050 @Override 051 public final void setParent(final EnterableState parent) { 052 super.setParent(parent); 053 } 054 055 /** 056 * @return true if the non-standard internal "entry.state.id" event will be raised after executing this OnEntry 057 */ 058 public final boolean isRaiseEvent() { 059 return raiseEvent != null && raiseEvent; 060 } 061 062 /** 063 * @return The indicator whether to raise the non-standard "entry.state.id" internal event after executing 064 * this OnEntry. When null no event will be raised 065 */ 066 public final Boolean getRaiseEvent() { 067 return raiseEvent; 068 } 069 070 /** 071 * Set the indicator whether to raise the non-standard "entry.state.id" internal event after executing this OnEntry. 072 * @param raiseEvent The indicator, when null no event will be raised 073 */ 074 public final void setRaiseEvent(final Boolean raiseEvent) { 075 this.raiseEvent = raiseEvent; 076 } 077} 078