Package org.ehrbase.dao.access.util
Class FolderUtils
java.lang.Object
org.ehrbase.dao.access.util.FolderUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckSiblingNameConflicts(com.nedap.archie.rm.directory.Folder folder) Checks each sub folder level for conflicts.static booleandoesAnyIdInFolderStructureMatch(I_FolderAccess folderAccess, com.nedap.archie.rm.support.identification.ObjectVersionId folderId) 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.static booleanuuidMatchesObjectVersionId(UUID ehrRootDirectoryId, com.nedap.archie.rm.support.identification.ObjectVersionId folderId)
-
Method Details
-
getPath
-
updateFolder
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) -
uuidMatchesObjectVersionId
public static boolean uuidMatchesObjectVersionId(UUID ehrRootDirectoryId, com.nedap.archie.rm.support.identification.ObjectVersionId folderId) -
doesAnyIdInFolderStructureMatch
public static boolean doesAnyIdInFolderStructureMatch(I_FolderAccess folderAccess, com.nedap.archie.rm.support.identification.ObjectVersionId folderId)
-