Class Helper
java.lang.Object
org.nuxeo.ecm.core.opencmis.tests.Helper
Various static methods used in several test cases.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentModelcreateDocument(CoreSession session, DocumentModel doc) static StringcreateUserWorkspace(CoreSession repo, String username) static GregorianCalendargetCalendar(int year, int month, int day, int hours, int minutes, int seconds) Gets a Calendar object.static GregorianCalendargetCalendar(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 Stringread(InputStream in, String charset) Reads a stream into a string.static DocumentModelsaveDocument(CoreSession session, DocumentModel doc) static voidFor 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
-