Package org.ehrbase.dao.access.util
Class FolderUtils
- java.lang.Object
-
- org.ehrbase.dao.access.util.FolderUtils
-
public class FolderUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckSiblingNameConflicts(com.nedap.archie.rm.directory.Folder folder)Checks each sub folder level for conflicts.static UUIDextractUuidFromObjectVersionId(com.nedap.archie.rm.support.identification.ObjectVersionId folderId)static IntegerextractVersionNumberFromObjectVersionId(com.nedap.archie.rm.support.identification.ObjectVersionId objectVersionId)static I_FolderAccessgetPath(I_FolderAccess folderAccess, int currentIndex, String[] path)static com.nedap.archie.rm.datastructures.ItemStructureparseFromJSONB(org.jooq.JSONB dbObject)static com.nedap.archie.rm.datastructures.ItemStructureparseFromPGobject(org.postgresql.util.PGobject databaseObject)static voidupdateFolder(com.nedap.archie.rm.directory.Folder update, I_FolderAccess target)Checks all fields that can be updated from update Folder object and sets the contents to the target folderAccess.
-
-
-
Method Detail
-
getPath
public static I_FolderAccess getPath(I_FolderAccess folderAccess, int currentIndex, String[] path)
-
updateFolder
public static void updateFolder(com.nedap.archie.rm.directory.Folder update, I_FolderAccess target)Checks all fields that can be updated from update Folder object and sets the contents to the target folderAccess.- Parameters:
update- - Folder update from request inputtarget- - folderAccess to set new values tos
-
checkSiblingNameConflicts
public static void checkSiblingNameConflicts(com.nedap.archie.rm.directory.Folder folder)
Checks each sub folder level for conflicts. For this purpose for each sub folder level there will be a set created that contains all names of the siblings as values. If at least one value could not be inserted it will be identified as duplicate and will throw an IllegalArgumentException that results to a 400 error on the controller layer.- Parameters:
folder- - Folder to check sub folders for
-
extractUuidFromObjectVersionId
public static UUID extractUuidFromObjectVersionId(com.nedap.archie.rm.support.identification.ObjectVersionId folderId)
-
extractVersionNumberFromObjectVersionId
public static Integer extractVersionNumberFromObjectVersionId(com.nedap.archie.rm.support.identification.ObjectVersionId objectVersionId)
-
parseFromJSONB
public static com.nedap.archie.rm.datastructures.ItemStructure parseFromJSONB(org.jooq.JSONB dbObject)
-
parseFromPGobject
public static com.nedap.archie.rm.datastructures.ItemStructure parseFromPGobject(org.postgresql.util.PGobject databaseObject)
-
-