public static void main(String[] args) { // create and configure beans ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"services.xml"}); ExampleObject exampleObject = context.getBean("exampleObject", ExampleObject.class); long time = exampleObject.getTimeout(); System.out.println("timeout was set to = " + time); long anotherTimeout = exampleObject.getAnotherBean().getTimeout(); System.out.println("anotherTimeout = " + anotherTimeout); }
public void testCreateObjectPermission() { createClass(ExampleObject.class); // ---------- Creating a Data Object with an owner_permissions example ExampleObject obj = new ExampleObject(); obj.setOwnerPermissions(DataObjectPermissions.READ); obj.data = "I am sample data"; Response<ExampleObject> response = obj.save(); // ----------------------------- assertEquals(Response.HTTP_CODE_CREATED, response.getHttpResultCode()); assertNotNull(response.getData()); assertEquals(DataObjectPermissions.READ, response.getData().getOwnerPermissions()); }