use of org.structr.core.Services in project structr by structr.
the class StructrLDAPClientModuleTest method startSystem.
@BeforeClass
public static void startSystem() {
final Date now = new Date();
final long timestamp = now.getTime();
basePath = "/tmp/structr-test-" + timestamp;
Settings.Services.setValue("NodeService LogService SchemaService HttpService AgentService LDAPService");
Settings.ConnectionUrl.setValue(Settings.TestingConnectionUrl.getValue());
// example for new configuration setup
Settings.BasePath.setValue(basePath);
Settings.DatabasePath.setValue(basePath + "/db");
Settings.FilesPath.setValue(basePath + "/files");
Settings.RelationshipCacheSize.setValue(1000);
Settings.NodeCacheSize.setValue(1000);
Settings.SuperUserName.setValue("superadmin");
Settings.SuperUserPassword.setValue("sehrgeheim");
Settings.ApplicationTitle.setValue("structr unit test app" + timestamp);
Settings.ApplicationHost.setValue(host);
Settings.HttpPort.setValue(httpPort);
Settings.Servlets.setValue("JsonRestServlet");
// Settings.LogSchemaOutput.setValue(true);
final Services services = Services.getInstance();
// wait for service layer to be initialized
do {
try {
Thread.sleep(100);
} catch (Throwable t) {
}
} while (!services.isInitialized());
securityContext = SecurityContext.getSuperUserInstance();
app = StructrApp.getInstance(securityContext);
}
use of org.structr.core.Services in project structr by structr.
the class StructrMessagingEngineModuleTest method startSystem.
@BeforeClass
public static void startSystem() {
final Date now = new Date();
final long timestamp = now.getTime();
basePath = "/tmp/structr-test-" + timestamp;
Settings.Services.setValue("NodeService LogService SchemaService HttpService AgentService");
Settings.ConnectionUrl.setValue(Settings.TestingConnectionUrl.getValue());
// example for new configuration setup
Settings.BasePath.setValue(basePath);
Settings.DatabasePath.setValue(basePath + "/db");
Settings.FilesPath.setValue(basePath + "/files");
Settings.RelationshipCacheSize.setValue(1000);
Settings.NodeCacheSize.setValue(1000);
Settings.SuperUserName.setValue("superadmin");
Settings.SuperUserPassword.setValue("sehrgeheim");
Settings.ApplicationTitle.setValue("structr unit test app" + timestamp);
Settings.ApplicationHost.setValue(host);
Settings.HttpPort.setValue(httpPort);
Settings.Servlets.setValue("JsonRestServlet");
final Services services = Services.getInstance();
// wait for service layer to be initialized
do {
try {
Thread.sleep(100);
} catch (Throwable t) {
}
} while (!services.isInitialized());
securityContext = SecurityContext.getSuperUserInstance();
app = StructrApp.getInstance(securityContext);
}
use of org.structr.core.Services in project structr by structr.
the class StructrLDAPServerModuleTest method startSystem.
@BeforeClass
public static void startSystem() {
final Date now = new Date();
final long timestamp = now.getTime();
basePath = "/tmp/structr-test-" + timestamp;
Settings.Services.setValue("NodeService LogService SchemaService HttpService AgentService LDAPServerService");
Settings.ConnectionUrl.setValue(Settings.TestingConnectionUrl.getValue());
// example for new configuration setup
Settings.BasePath.setValue(basePath);
Settings.DatabasePath.setValue(basePath + "/db");
Settings.FilesPath.setValue(basePath + "/files");
Settings.RelationshipCacheSize.setValue(1000);
Settings.NodeCacheSize.setValue(1000);
Settings.SuperUserName.setValue("superadmin");
Settings.SuperUserPassword.setValue("sehrgeheim");
Settings.ApplicationTitle.setValue("structr unit test app" + timestamp);
Settings.ApplicationHost.setValue(host);
Settings.HttpPort.setValue(httpPort);
Settings.Servlets.setValue("JsonRestServlet");
// Settings.LogSchemaOutput.setValue(true);
final Services services = Services.getInstance();
// wait for service layer to be initialized
do {
try {
Thread.sleep(100);
} catch (Throwable t) {
}
} while (!services.isInitialized());
securityContext = SecurityContext.getSuperUserInstance();
app = StructrApp.getInstance(securityContext);
}
use of org.structr.core.Services in project structr by structr.
the class StructrMediaModuleTest method startSystem.
@BeforeClass
public static void startSystem() {
final Date now = new Date();
final long timestamp = now.getTime();
basePath = "/tmp/structr-test-" + timestamp;
Settings.Services.setValue("NodeService LogService SchemaService HttpService AgentService");
Settings.ConnectionUrl.setValue(Settings.TestingConnectionUrl.getValue());
// example for new configuration setup
Settings.BasePath.setValue(basePath);
Settings.DatabasePath.setValue(basePath + "/db");
Settings.FilesPath.setValue(basePath + "/files");
Settings.RelationshipCacheSize.setValue(1000);
Settings.NodeCacheSize.setValue(1000);
Settings.SuperUserName.setValue("superadmin");
Settings.SuperUserPassword.setValue("sehrgeheim");
Settings.ApplicationTitle.setValue("structr unit test app" + timestamp);
Settings.ApplicationHost.setValue(host);
Settings.HttpPort.setValue(httpPort);
Settings.Servlets.setValue("JsonRestServlet");
// Settings.LogSchemaOutput.setValue(true);
final Services services = Services.getInstance();
// wait for service layer to be initialized
do {
try {
Thread.sleep(100);
} catch (Throwable t) {
}
} while (!services.isInitialized());
securityContext = SecurityContext.getSuperUserInstance();
app = StructrApp.getInstance(securityContext);
}
use of org.structr.core.Services in project structr by structr.
the class GeoTest method startSystem.
public static void startSystem(final Map<String, Object> additionalConfig) {
final Date now = new Date();
final long timestamp = now.getTime();
basePath = "/tmp/structr-test-" + timestamp;
Settings.Services.setValue("NodeService HttpService SchemaService");
Settings.ConnectionUrl.setValue(Settings.TestingConnectionUrl.getValue());
// example for new configuration setup
Settings.BasePath.setValue(basePath);
Settings.DatabasePath.setValue(basePath + "/db");
Settings.FilesPath.setValue(basePath + "/files");
Settings.RelationshipCacheSize.setValue(1000);
Settings.NodeCacheSize.setValue(1000);
Settings.SuperUserName.setValue("superadmin");
Settings.SuperUserPassword.setValue("sehrgeheim");
Settings.ApplicationTitle.setValue("structr unit test app" + timestamp);
Settings.Servlets.setValue("JsonRestServlet WebSocketServlet HtmlServlet");
final Services services = Services.getInstance();
// wait for service layer to be initialized
do {
try {
Thread.sleep(100);
} catch (Throwable t) {
}
} while (!services.isInitialized());
securityContext = SecurityContext.getSuperUserInstance();
app = StructrApp.getInstance(securityContext);
}
Aggregations