adding static methods for publishDocument, unpublishDocument, trashDocument and test cases