Class Helper
- java.lang.Object
-
- org.nuxeo.ecm.core.opencmis.tests.Helper
-
public class Helper extends Object
Various static methods used in several test cases.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILE1_CONTENT
-
Constructor Summary
Constructors Constructor Description Helper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DocumentModel
createDocument(CoreSession session, DocumentModel doc)
static String
createUserWorkspace(CoreSession repo, String username)
static GregorianCalendar
getCalendar(int year, int month, int day, int hours, int minutes, int seconds)
Gets a Calendar object.static GregorianCalendar
getCalendar(int year, int month, int day, int hours, int minutes, int seconds, TimeZone tz)
Gets a Calendar object with a specific timezonestatic Map<String,String>
makeNuxeoRepository(CoreSession session)
static Map<String,String>
makeNuxeoRepository(CoreSession session, boolean addProxy)
Creates data in the repository using the Nuxeo API.static String
read(InputStream in, String charset)
Reads a stream into a string.static DocumentModel
saveDocument(CoreSession session, DocumentModel doc)
static void
sleepForAuditGranularity()
For audit, make sure event dates don't have the same millisecond.
-
-
-
Field Detail
-
FILE1_CONTENT
public static final String FILE1_CONTENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
read
public static String read(InputStream in, String charset) throws IOException
Reads a stream into a string.- Throws:
IOException
-
getCalendar
public static GregorianCalendar getCalendar(int year, int month, int day, int hours, int minutes, int seconds)
Gets a Calendar object.
-
getCalendar
public static GregorianCalendar getCalendar(int year, int month, int day, int hours, int minutes, int seconds, TimeZone tz)
Gets a Calendar object with a specific timezone
-
makeNuxeoRepository
public static Map<String,String> makeNuxeoRepository(CoreSession session)
-
makeNuxeoRepository
public static Map<String,String> makeNuxeoRepository(CoreSession session, boolean addProxy)
Creates data in the repository using the Nuxeo API. This is then used as a starting point by unit tests.
-
sleepForAuditGranularity
public static void sleepForAuditGranularity()
For audit, make sure event dates don't have the same millisecond.
-
createDocument
public static DocumentModel createDocument(CoreSession session, DocumentModel doc)
-
saveDocument
public static DocumentModel saveDocument(CoreSession session, DocumentModel doc)
-
createUserWorkspace
public static String createUserWorkspace(CoreSession repo, String username)
-
-