KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > core > solution > IActionResource


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11  * the license for the specific language governing your rights and limitations.
12  *
13  * @created Jun 25, 2005
14  * @author James Dixon
15  *
16  */

17
18 package org.pentaho.core.solution;
19
20 /**
21  * The ActionResource interface represents one resource in an ActionSequence.
22  * Resources are elements in a solution that exist outside of the action
23  * sequence document, such as images, icons, additional definition documents,
24  * etc.
25  */

26 public interface IActionResource {
27
28     /**
29      * The Resource is a solution file
30      */

31     public static final int SOLUTION_FILE_RESOURCE = 1;
32
33     /**
34      * The resource is a URL
35      */

36     public static final int URL_RESOURCE = 2;
37     
38     /**
39      * The resource is an arbitrary file
40      */

41     public static final int FILE_RESOURCE = 3;
42
43     /**
44      * The resource type is unknown
45      */

46     public static final int UNKNOWN_RESOURCE = 4;
47
48     /**
49      * The resource type is an embedded string
50      */

51     public static final int STRING = 5;
52
53     /**
54      * The resource type is embedded xml
55      */

56     public static final int XML = 6;
57
58     /**
59      * Return the xml node name of the resource
60      *
61      * @return name of the resource
62      */

63     public String JavaDoc getName();
64
65     /**
66      * Returns the mime type of the resource. Since resources are external, they
67      * can take on many different formats ie., text/xml, image/jpg, etc.
68      *
69      * @return the mime type of the resource
70      */

71     public String JavaDoc getMimeType();
72
73     /**
74      * Get the type of external resource that this ActionResource is derived
75      * from.
76      * <p>
77      * Valid source types are SOLUTION_FILE_RESOURCE, URL_RESOURCE,
78      * FILE_RESOURCE and UNKNOWN_RESOURCE
79      *
80      * @return the resource source type
81      */

82     public int getSourceType();
83
84     /**
85      * Depending on the resource source type, returns the address to the
86      * resource as a path or a URL.
87      *
88      * @return address of resource
89      */

90     // public String getLocation();
91
public String JavaDoc getAddress();
92
93 }
94
Popular Tags