eXo Platform 3.5
  • Prev
  • Next

Chapter 48. DBCleanService

API

It is special service for removing data from database.

Note

Code that invokes methods of DBCleanService must have JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION permission;

There are three methods of DBCleanerService:

public static void cleanWorkspaceData(WorkspaceEntry wsEntry)Clean workspace data from database. Tables will be removed in case of multiDB, and only records will be removed in case of singleDB.
public static void cleanRepositoryData(RepositoryEntry repoEntry)Cleanup repository data from database.
public static getDBCleaner(Connection jdbcConn, WorkspaceEntry wsEntry)Returns DBClean object with defined connection that allow to manual invoke clean method on it. Note: DBClean doesn't perform commit or close connection. It should be done manually.

  • Prev
  • Up
  • Home
  • Next