001 /*
002 * Copyright 2004 Chris Nelson
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
007 * Unless required by applicable law or agreed to in writing,
008 * software distributed under the License is distributed on an "AS IS" BASIS,
009 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010 * See the License for the specific language governing permissions and limitations under the License.
011 */
012 package org.trails.link;
013
014 import org.apache.tapestry.annotations.ComponentClass;
015 import org.trails.page.PageType;
016
017 /**
018 * ListAllLink renders a single link that has a target of the List page for a given object. It is abstract because
019 * Tapestry will populate the bean with getter/setters for fields in it. The base class is constructed with the name
020 * of the type that this link will connect to, and all list operations are synthesized from that single name.
021 */
022 @ComponentClass
023 public abstract class ListAllLink extends AbstractTypeNavigationLink
024 {
025
026 public PageType getPageType()
027 {
028 return PageType.LIST;
029 }
030
031 public String getBundleKey()
032 {
033 return "org.trails.component.listalllink";
034 }
035
036 public String getDefaultMessage()
037 {
038 return "[TRAILS][ORG.TRAILS.COMPONENT.LISTALLLINK]";
039 }
040
041 public Object getParams()
042 {
043 return getClassDescriptor().getPluralDisplayName();
044 }
045 }