Coverage Report - br.com.arsmachina.tapestrycrud.Constants
 
Classes in this File Line Coverage Branch Coverage Complexity
Constants
0%
0/2
N/A
1
 
 1  
 // Copyright 2008 Thiago H. de Paula Figueiredo
 2  
 //
 3  
 // Licensed under the Apache License, Version 2.0 (the "License");
 4  
 // you may not use this file except in compliance with the License.
 5  
 // You may obtain a copy of the License at
 6  
 //
 7  
 //     http://www.apache.org/licenses/LICENSE-2.0
 8  
 //
 9  
 // Unless required by applicable law or agreed to in writing, software
 10  
 // distributed under the License is distributed on an "AS IS" BASIS,
 11  
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
 // See the License for the specific language governing permissions and
 13  
 // limitations under the License.
 14  
 
 15  
 package br.com.arsmachina.tapestrycrud;
 16  
 
 17  
 
 18  
 import org.apache.tapestry5.beaneditor.BeanModel;
 19  
 import org.apache.tapestry5.corelib.components.Grid;
 20  
 
 21  
 import br.com.arsmachina.tapestrycrud.components.ActionLinks;
 22  
 
 23  
 /**
 24  
  * Class that holds some constants related to Tapestry CRUD.
 25  
  * 
 26  
  * @author Thiago H. de Paula Figueiredo
 27  
  */
 28  
 final public class Constants {
 29  
         
 30  
         /**
 31  
          * Event generated by the remove link in the {@link ActionLinks} component.
 32  
          */
 33  
         public static final String REMOVE_OBJECT_ACTION = "removeObject";
 34  
 
 35  
         /**
 36  
          * Form id (t:id). All event handler methods is this class expect a form with this id.
 37  
          */
 38  
         public static final String FORM_ID = "form";
 39  
 
 40  
         /**
 41  
          * Message shown after a successful object save or update.
 42  
          */
 43  
         public static final String MESSAGE_SAVEORUPDATE_SUCCESS = "message.success.saveorupdate";
 44  
 
 45  
         /**
 46  
          * Tapestry CRUD CSS asset path.
 47  
          */
 48  
         public static final String TAPESTRY_CRUD_CSS_ASSET = "classpath:/br/com/arsmachina/tapestrycrud/components/tapestry-crud.css";
 49  
 
 50  
         /**
 51  
          * Remove object success message key.
 52  
          */
 53  
         public static final String MESSAGE_SUCCESS_REMOVE = "message.success.remove";
 54  
 
 55  
         /**
 56  
          * Remove object success error (remove not allowed) key.
 57  
          */
 58  
         public static final String MESSAGE_ERROR_REMOVE_NOT_ALLOWED = "message.error.remove.notallowed";
 59  
 
 60  
         /**
 61  
          * Remove object success error (object not found) key.
 62  
          */
 63  
         public static final String MESSAGE_ERROR_REMOVE_NOT_FOUND = "message.error.remove.notfound";
 64  
 
 65  
         /**
 66  
          * Name of the pseudo-property added to the {@link BeanModel} returned by
 67  
          * {@link #getBeanModel()} to hold actions related to an object in a {@link Grid}.
 68  
          */
 69  
         public static final String ACTION_PROPERTY_NAME = "action";
 70  
 
 71  
         /**
 72  
          * Name of the pseudo-property added to the {@link BeanModel} returned by
 73  
          * {@link #getBeanModel()} to hold actions related to an object in a {@link Grid}.
 74  
          */
 75  
         public static final String REMOVE_COMPONENT_ID = "remove";
 76  
 
 77  
         /**
 78  
          * Default zone ID to be returned by AJAX form submissions.
 79  
          */
 80  
         public static final String DEFAULT_FORM_ZONE_ID = "zone";
 81  
 
 82  
         /**
 83  
          * Default block ID to be returned by AJAX form submissions.
 84  
          */
 85  
         public static final String DEFAULT_FORM_BLOCK_ID = "block";
 86  
 
 87  
         /**
 88  
          * Single constructor of this class.
 89  
          */
 90  0
         private Constants() {
 91  0
         }
 92  
 
 93  
         /**
 94  
          * New object event.
 95  
          */
 96  
         public static final String NEW_OBJECT_EVENT = "newObject";
 97  
 
 98  
         }