| 1 |
/** |
|---|
| 2 |
* The contents of this file are subject to the OpenMRS Public License |
|---|
| 3 |
* Version 1.0 (the "License"); you may not use this file except in |
|---|
| 4 |
* compliance with the License. You may obtain a copy of the License at |
|---|
| 5 |
* http://license.openmrs.org |
|---|
| 6 |
* |
|---|
| 7 |
* Software distributed under the License is distributed on an "AS IS" |
|---|
| 8 |
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|---|
| 9 |
* License for the specific language governing rights and limitations |
|---|
| 10 |
* under the License. |
|---|
| 11 |
* |
|---|
| 12 |
* Copyright (C) OpenMRS, LLC. All Rights Reserved. |
|---|
| 13 |
*/ |
|---|
| 14 |
package org.openmrs.module.web.extension; |
|---|
| 15 |
|
|---|
| 16 |
import org.openmrs.module.Extension; |
|---|
| 17 |
|
|---|
| 18 |
public abstract class BoxExt extends Extension { |
|---|
| 19 |
|
|---|
| 20 |
public Extension.MEDIA_TYPE getMediaType() { |
|---|
| 21 |
return Extension.MEDIA_TYPE.html; |
|---|
| 22 |
} |
|---|
| 23 |
|
|---|
| 24 |
/** |
|---|
| 25 |
* @return The message code of the label of this link |
|---|
| 26 |
*/ |
|---|
| 27 |
public abstract String getPortletUrl(); |
|---|
| 28 |
|
|---|
| 29 |
/** |
|---|
| 30 |
* The title is used as the title for the boxHeader. |
|---|
| 31 |
* The returned String can be either straight up plain |
|---|
| 32 |
* text or a Spring message code. |
|---|
| 33 |
* |
|---|
| 34 |
* @return String title |
|---|
| 35 |
*/ |
|---|
| 36 |
public abstract String getTitle(); |
|---|
| 37 |
|
|---|
| 38 |
/** |
|---|
| 39 |
* Returns the content used for the box. |
|---|
| 40 |
* |
|---|
| 41 |
* @return Content string |
|---|
| 42 |
*/ |
|---|
| 43 |
public abstract String getContent(); |
|---|
| 44 |
|
|---|
| 45 |
/** |
|---|
| 46 |
* Returns the required privilege in order to see this section. Can be a |
|---|
| 47 |
* comma delimited list of privileges. |
|---|
| 48 |
* If the default empty string is returned, only an authenticated |
|---|
| 49 |
* user is required |
|---|
| 50 |
* |
|---|
| 51 |
* @return Privilege string |
|---|
| 52 |
*/ |
|---|
| 53 |
public String getRequiredPrivilege() { |
|---|
| 54 |
return ""; |
|---|
| 55 |
} |
|---|
| 56 |
} |
|---|