Package org.duracloud.duradmin.util
Class SpaceUtil
java.lang.Object
org.duracloud.duradmin.util.SpaceUtil
Provides utility methods for spaces.
- Author:
- Bill Branan
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringprotected static booleanstatic booleanisAdmin(org.springframework.security.core.Authentication authentication) protected static booleanisSnapshotProvider(ContentStore store) static voidpopulateContentItem(String duradminBaseURL, ContentItem contentItem, String spaceId, String contentId, ContentStore store, org.springframework.security.core.Authentication authentication) static SpacepopulateSpace(Space space, Space cloudSpace, ContentStore contentStore, org.springframework.security.core.Authentication authentication) static AclTyperesolveCallerAcl(String spaceId, ContentStore store, Map<String, AclType> acls, org.springframework.security.core.Authentication authentication) static AclTyperesolveCallerAcl(String spaceId, ContentStore store, Map<String, AclType> acls, org.springframework.security.core.Authentication authentication, Boolean snapshotInProgress) static voidstatic voidstreamContent(ContentStore store, javax.servlet.http.HttpServletResponse response, String spaceId, String contentId) static voidstreamToResponse(InputStream is, javax.servlet.http.HttpServletResponse response, String mimetype, String contentLength)
-
Method Details
-
populateSpace
public static Space populateSpace(Space space, Space cloudSpace, ContentStore contentStore, org.springframework.security.core.Authentication authentication) throws ContentStoreException - Throws:
ContentStoreException
-
populateContentItem
public static void populateContentItem(String duradminBaseURL, ContentItem contentItem, String spaceId, String contentId, ContentStore store, org.springframework.security.core.Authentication authentication) throws ContentStoreException - Throws:
ContentStoreException
-
streamContent
public static void streamContent(ContentStore store, javax.servlet.http.HttpServletResponse response, String spaceId, String contentId) throws ContentStoreException, IOException - Throws:
ContentStoreExceptionIOException
-
streamToResponse
public static void streamToResponse(InputStream is, javax.servlet.http.HttpServletResponse response, String mimetype, String contentLength) throws ContentStoreException, IOException - Throws:
ContentStoreExceptionIOException
-
resolveCallerAcl
public static AclType resolveCallerAcl(String spaceId, ContentStore store, Map<String, AclType> acls, org.springframework.security.core.Authentication authentication) throws ContentStoreException- Throws:
ContentStoreException
-
resolveCallerAcl
public static AclType resolveCallerAcl(String spaceId, ContentStore store, Map<String, AclType> acls, org.springframework.security.core.Authentication authentication, Boolean snapshotInProgress) throws ContentStoreException- Throws:
ContentStoreException
-
isSnapshotProvider
-
isAdmin
public static boolean isAdmin(org.springframework.security.core.Authentication authentication) -
hasRole
protected static boolean hasRole(org.springframework.security.core.Authentication authentication, String role) -
toAclList
-
sortAcls
-
formatAclDisplayName
-