/
ICartridge.java
executable file
·82 lines (69 loc) · 2.24 KB
/
ICartridge.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*******************************************************************************
* Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package com.openshift.client.cartridge;
import java.net.URL;
import com.openshift.internal.client.CartridgeType;
/**
* @author André Dietisheim
*/
public interface ICartridge {
public static final char NAME_VERSION_DELIMITER = '-';
/**
* Returns the name of this cartridge
*
* @return the name
*/
public abstract String getName();
/**
* Returns a (human readable, nice) display name for this cartridge
*
* @return the display name
*/
public String getDisplayName();
/**
* Returns a description for this cartridge
*
* @return the description
*/
public String getDescription();
/**
* Returns <code>true</code> if this is a downloadable cartridge whose code
* may be downloaded at the url returned by {@link #getUrl()} (cartridge
* code will get downloaded upon creation).
* Examples:
* <ul>
* <li>go standalone cartridge (https://github.com/smarterclayton/openshift-go-cart)</li>
* <li>redis embedded cartridge (https://github.com/smarterclayton/openshift-redis-cart)</li>
* <li>foreman embedded cartridge (https://github.com/ncdc/openshift-foreman-cartridge)</li>
* </ul>
*
* @return <code>true</code> if this is a downloadable cartridge
*
* @see #getUrl()
*/
public boolean isDownloadable();
/**
* Returns the url at which the code for this cartridge may get downloaded.
* Returns <code>null</null> if this is not a downloadable cartridge.
*
* @return the url if downloadable cartridge or null
*
* @see #isDownloadable()
*/
public URL getUrl();
public CartridgeType getType();
/**
* Returns <code>true</code> if this cartridge is obsolete, <code>false</code> otherwise.
*
* @return true if this cartridge is obsolete
*/
boolean isObsolete();
}