| |
|
| java.lang.Object com.pentaho.repository.dbbased.solution.RepositoryUpdateHelper
RepositoryUpdateHelper | public class RepositoryUpdateHelper (Code) | | This class is used for handling all the bits and twiddles of updating the RDBMS Solution Repository. All state during update is handled here.
author: mbatchel |
createdOrRetrievedFolders | Map createdOrRetrievedFolders(Code) | | |
logger | final protected static Log logger(Code) | | |
nameReplacementMap | Map nameReplacementMap(Code) | | |
reposFileStructure | Map reposFileStructure(Code) | | |
convertFileName | protected String convertFileName(String fName)(Code) | | Converts the name from a DOS/Windows/Unix canonical name into the name in the RDBMS repository For example: From: c:\workspace\pentaho\solutions\samples\myfile.xaction To: /solutions/samples/myfile.xaction
Parameters: fName - Canonical file name Fixed file name within the RDBMS repository |
createFolder | protected RepositoryFile createFolder(File newFolder) throws IOException(Code) | | This method creates a new folder in the RDBMS Repository. This means finding the correct parent (a Hibernate Query may have to be executed to get the parent).
Parameters: newFolder - The File that points to the new folder to create The RepositoryFile object created throws: IOException - |
createNewFile | protected RepositoryFile createNewFile(File newFile) throws IOException(Code) | | Creates a new RepositoryFile object from the File on the hard drive
Parameters: newFile - The File object pointing to the file on the hard drive RepositoryFile object created throws: IOException - |
getLastModifiedDateFromMap | protected long getLastModifiedDateFromMap(String fileName)(Code) | | Retrieves the last modified date from the map returned from Hibernate. Also touches the object in the map to indicate it was traversed during the filesystem crawl
Parameters: fileName - The name of the file to lookup in the map null if the file isn't already in the RDBMS, or the last modified date/time of the file |
getParent | protected ISolutionFile getParent(String parentName)(Code) | | Gets the parent folder for the file/folder. May result in a Hibernate query if the folder wasn't one that was created during the process. There shouldn't be a way for the folder to not exist. Either it was previously created during this update cycle (in which case it'll already be in the createdOrRetrievedFolders map) or it already existed in the RDBMS Repo in which case it will be retrieved and put in the map.
Parameters: parentName - The solution path to the parent. RepositoryFile The parent object |
performHibernateDelete | protected void performHibernateDelete(List deletions)(Code) | | Actually deletes the RepositoryFile objects from Hibernate
Parameters: deletions - List of files deleted |
processAdditions | protected void processAdditions() throws IOException(Code) | | Process additions (files and folders) by adding them to the repository tree
throws: IOException - |
processDeletions | protected List processDeletions(boolean deleteOrphans)(Code) | | Processes deletions by looking at the InfoHolder object for items that weren't touched during traversal of the file system.
Parameters: deleteOrphans - Whether to actually delete the items from Hibernate |
processUpdates | protected void processUpdates() throws IOException(Code) | | Process updates (files and folders) by updating their time and/or updating contents
throws: IOException - |
recordFile | protected boolean recordFile(File f) throws IOException(Code) | | Determines whether a file has been updated or was added.
Parameters: f - File object pointing to the file on the hard drive true if the file has been changed. throws: IOException - |
recordFolder | protected void recordFolder(File aFile) throws IOException(Code) | | Determines whether the folder already exists, or needs to be added.
Parameters: aFile - The File object pointing to the folder on the drive throws: IOException - |
|
|
|