Class Helper
java.lang.Object
org.nuxeo.ecm.core.opencmis.tests.Helper
Various static methods used in several test cases.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 timezonemakeNuxeoRepository
(CoreSession session) 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
For audit, make sure event dates don't have the same millisecond.
-
Field Details
-
FILE1_CONTENT
- See Also:
-
-
Constructor Details
-
Helper
public Helper()
-
-
Method Details
-
read
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
-
makeNuxeoRepository
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
-
saveDocument
-
createUserWorkspace
-