Initial import.
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portal/portal-manager@81901 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f44deb6bec
commit
908219b7c1
|
@ -14,32 +14,32 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clients can obtain the single instance of the {@link Portal} by invoking its static method {@link #getConfiguration()}.
|
* Clients can obtain the single instance of the {@link PortalContext} by invoking its static method {@link #getConfiguration()}.
|
||||||
* The first invocation of the method triggers the initialisation of the instance.
|
* The first invocation of the method triggers the initialisation of the instance.
|
||||||
*
|
*
|
||||||
* @author Massimiliano Assante (ISTI-CNR)
|
* @author Massimiliano Assante (ISTI-CNR)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class Portal {
|
public class PortalContext {
|
||||||
private static final Logger _log = LoggerFactory.getLogger(Portal.class);
|
private static final Logger _log = LoggerFactory.getLogger(PortalContext.class);
|
||||||
|
|
||||||
public static final String INFRASTRUCTURE_NAME = "infrastructure";
|
public static final String INFRASTRUCTURE_NAME = "infrastructure";
|
||||||
public static final String SCOPES = "scopes";
|
public static final String SCOPES = "scopes";
|
||||||
|
|
||||||
protected static Portal singleton = new Portal();
|
protected static PortalContext singleton = new PortalContext();
|
||||||
|
|
||||||
private String infra;
|
private String infra;
|
||||||
private String vos;
|
private String vos;
|
||||||
|
|
||||||
private Portal() {
|
private PortalContext() {
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return the instance
|
* @return the instance
|
||||||
*/
|
*/
|
||||||
public synchronized static Portal getConfiguration() {
|
public synchronized static PortalContext getConfiguration() {
|
||||||
return singleton == null ? new Portal() : singleton;
|
return singleton == null ? new PortalContext() : singleton;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public class Portal {
|
||||||
vos = "";
|
vos = "";
|
||||||
_log.error("infrastructure.properties file not found under $CATALINA_HOME/ dir, setting default infrastructure Name and no Scopes" + infra);
|
_log.error("infrastructure.properties file not found under $CATALINA_HOME/ dir, setting default infrastructure Name and no Scopes" + infra);
|
||||||
}
|
}
|
||||||
_log.info("Portal configurator correctly initialized on " + infra);
|
_log.info("PortalContext configurator correctly initialized on " + infra);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getInfrastructureName() {
|
public String getInfrastructureName() {
|
Loading…
Reference in New Issue