public interface PortalObjectRepository
Modifier and Type | Method and Description |
---|---|
<T extends ManagedPortalObject> |
create(PropertyBean bean, Portal portal)
Create a new portal object with the properties supplied in the property bean.
|
boolean |
createAllowed(java.lang.Class<? extends ManagedPortalObject> type, Portal portal)
Returns a flag indicating whether the current user has permission to create the supplied type within the supplied portal.
|
<T extends ManagedPortalObject> |
findById(java.lang.String id)
Lookup a portal object by ID.
|
<T extends ManagedPortalObject> |
findById(java.lang.String id, boolean loadGraph)
Lookup a portal object by ID.
|
<T extends ManagedPortalObject> |
findByName(Portal portal, java.lang.String namespace, java.lang.String name)
Lookup a portal object by name.
|
<T extends ManagedPortalObject> |
findByName(Portal portal, java.lang.String namespace, java.lang.String name, boolean loadGraph)
Lookup a portal object by name, supplying the containing portal as an object.
|
<T extends ManagedPortalObject> |
findByName(java.lang.String portal, java.lang.String namespace, java.lang.String name)
Lookup a portal object by name, supplying the containing portal by name.
|
<T extends ManagedPortalObject> |
findByName(java.lang.String portal, java.lang.String namespace, java.lang.String name, boolean loadGraph)
Lookup a portal object by name, supplying the containing portal by name.
|
<T extends ManagedPortalObject> |
findByShortId(java.lang.String shortId)
Lookup a portal object by short ID.
|
<T extends ManagedPortalObject> |
findByShortId(java.lang.String shortId, boolean loadGraph)
Lookup a portal object by short ID.
|
PortalInstance |
getDefaultPortal()
Gets the Seeded Default Portal for Spaces.This represents the user's home space as well as the portal where shared resources are stored.
|
PortalObjectQueryFactory |
getQueryFactory()
Gets the Query Factory for Portal Objects.
|
boolean |
isDefaultPortal(java.lang.String portalId)
Deprecated.
Not for public use. This method is expected to be removed in the future. Replaced by
Portal.isDefault() |
<T extends ManagedPortalObject> |
queryByNameAndType(java.lang.String name, java.lang.Class<T> type, int limit, int offset)
Finds a list of portal objects with a given type and a given name.
|
<T extends BasePage> |
queryByPagePathAndType(java.lang.String pagePath, java.lang.Class<T> type)
Finds a list of objects by page path and type.
|
<T extends ManagedPortalObject> |
queryByType(Portal portal, java.lang.Class<T> type, int limit, int offset)
Finds a list of portal objects with a given type, within a given portal.
|
<T extends PropertyBean> |
toBeanList(java.util.List<? extends ManagedPortalObject<? extends T>> objects)
Maps a List of ManagedPortalObject into a List of PropertyBean.
|
<T extends ManagedPortalObject> T create(PropertyBean bean, Portal portal)
PortalObject.getProperties()
on the newly created ManagedPortalObject
.bean
- the property bean specifying the initial state of the new portal objectportal
- the portal that this new object belongs to, or null<T extends ManagedPortalObject> T findById(java.lang.String id)
id
- the ID of the portal object to find<T extends ManagedPortalObject> T findByShortId(java.lang.String shortId)
shortId
- the shortID of the portal object to find<T extends ManagedPortalObject> T findByName(Portal portal, java.lang.String namespace, java.lang.String name)
portal
- the portal to searchnamespace
- the namespace of the object to findname
- the name of the object to find<T extends ManagedPortalObject> T findByName(java.lang.String portal, java.lang.String namespace, java.lang.String name)
portal
- the name of portal to searchnamespace
- the namespace of the object to findname
- the name of the object to find<T extends ManagedPortalObject> T findById(java.lang.String id, boolean loadGraph)
id
- the ID of the portal object to findloadGraph
- Flag to indicate whether the objects referenced objects should be loaded into memory as part of the same query.<T extends ManagedPortalObject> T findByShortId(java.lang.String shortId, boolean loadGraph)
shortId
- the shortID of the portal object to findloadGraph
- flag to indicate whether the objects referenced objects should be loaded into memory as part of the same query.<T extends ManagedPortalObject> T findByName(Portal portal, java.lang.String namespace, java.lang.String name, boolean loadGraph)
portal
- the portal to searchnamespace
- the namespace of the object to findname
- the name of the object to findloadGraph
- flag to indicate whether the objects referenced objects should be loaded into memory as part of the same query.<T extends ManagedPortalObject> T findByName(java.lang.String portal, java.lang.String namespace, java.lang.String name, boolean loadGraph)
portal
- the name of portal to searchnamespace
- the namespace of the object to findname
- the name of the object to findloadGraph
- flag to indicate whether the objects referenced objects should be loaded into memory as part of the same query.<T extends ManagedPortalObject> java.util.List<T> queryByType(Portal portal, java.lang.Class<T> type, int limit, int offset)
portal
- the portal to searchtype
- the type of the objects to findlimit
- the maximum number of results to returnoffset
- the index of the first result to return<T extends BasePage> java.util.List<T> queryByPagePathAndType(java.lang.String pagePath, java.lang.Class<T> type)
pagePath
- the path of the pagetype
- the type of the objects to find<T extends ManagedPortalObject> java.util.List<T> queryByNameAndType(java.lang.String name, java.lang.Class<T> type, int limit, int offset)
name
- the name of the object to searchtype
- the type of the objects to findlimit
- the maximum number of results to returnoffset
- the index of the first result to return<T extends PropertyBean> java.util.List<T> toBeanList(java.util.List<? extends ManagedPortalObject<? extends T>> objects)
objects
- the list of objects from which the method extracts PropertyBeansPortalInstance getDefaultPortal()
@Deprecated boolean isDefaultPortal(java.lang.String portalId)
Portal.isDefault()
PortalObjectQueryFactory getQueryFactory()
boolean createAllowed(java.lang.Class<? extends ManagedPortalObject> type, Portal portal)
type
- The type the user wants to create and instance ofportal
- The portal the user wants to create the object within, if any