| Classes in this File | Line Coverage | Branch Coverage | Complexity | |||||||
| NewLink |
|
| 0.0;0 |
| 1 | /* |
|
| 2 | * Copyright 2004 Chris Nelson |
|
| 3 | * |
|
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
|
| 5 | * you may not use this file except in compliance with the License. |
|
| 6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |
|
| 7 | * Unless required by applicable law or agreed to in writing, |
|
| 8 | * software distributed under the License is distributed on an "AS IS" BASIS, |
|
| 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
| 10 | * See the License for the specific language governing permissions and limitations under the License. |
|
| 11 | */ |
|
| 12 | package org.trails.link; |
|
| 13 | ||
| 14 | import org.trails.page.PageType; |
|
| 15 | import org.apache.tapestry.annotations.ComponentClass; |
|
| 16 | ||
| 17 | /** |
|
| 18 | * Render a link allowing a new entity of the parameterized type to be created. |
|
| 19 | */ |
|
| 20 | @ComponentClass |
|
| 21 | 0 | public abstract class NewLink extends AbstractTypeNavigationLink |
| 22 | { |
|
| 23 | ||
| 24 | public PageType getPageType() |
|
| 25 | { |
|
| 26 | 0 | return PageType.NEW; |
| 27 | } |
|
| 28 | ||
| 29 | public String getBundleKey() |
|
| 30 | { |
|
| 31 | 0 | return "org.trails.component.newlink"; |
| 32 | } |
|
| 33 | ||
| 34 | public String getDefaultMessage() |
|
| 35 | { |
|
| 36 | 0 | return "[TRAILS][ORG.TRAILS.COMPONENT.NEWLINK]"; |
| 37 | } |
|
| 38 | ||
| 39 | public Object getParams() |
|
| 40 | { |
|
| 41 | 0 | return getClassDescriptor().getDisplayName(); |
| 42 | } |
|
| 43 | } |