Class GraphRequestFactory

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class GraphRequestFactory
    extends java.lang.Object
    implements org.springframework.context.ApplicationContextAware
    Create request objects that are executed using the GraphPathBean.
    Since:
    5.1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphRequestFactory​(ome.security.ACLVoter aclVoter, ome.system.Roles securityRoles, ome.services.graphs.GraphPathBean graphPathBean, ome.security.basic.LightAdminPrivileges adminPrivileges, ome.services.delete.Deletion deletionInstance, java.util.Map<java.lang.Class<? extends Request>,​java.util.List<java.lang.String>> allTargets, java.util.Map<java.lang.Class<? extends Request>,​java.util.List<ome.services.graphs.GraphPolicyRule>> allRules, java.util.List<java.lang.String> unnullable, java.util.Set<java.lang.String> defaultExcludeNs)
      Construct a new graph request factory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ChildOption createChildOption()  
      ome.services.graphs.GraphPathBean getGraphPathBean()  
      <R extends GraphQuery>
      java.util.Set<java.lang.Class<? extends ome.model.IObject>>
      getLegalTargets​(java.lang.Class<R> requestClass)
      Get the legal target object classes for the given request.
      <R extends GraphQuery>
      R
      getRequest​(java.lang.Class<R> requestClass)
      Construct a request.
      void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GraphRequestFactory

        public GraphRequestFactory​(ome.security.ACLVoter aclVoter,
                                   ome.system.Roles securityRoles,
                                   ome.services.graphs.GraphPathBean graphPathBean,
                                   ome.security.basic.LightAdminPrivileges adminPrivileges,
                                   ome.services.delete.Deletion deletionInstance,
                                   java.util.Map<java.lang.Class<? extends Request>,​java.util.List<java.lang.String>> allTargets,
                                   java.util.Map<java.lang.Class<? extends Request>,​java.util.List<ome.services.graphs.GraphPolicyRule>> allRules,
                                   java.util.List<java.lang.String> unnullable,
                                   java.util.Set<java.lang.String> defaultExcludeNs)
                            throws ome.services.graphs.GraphException
        Construct a new graph request factory.
        Parameters:
        aclVoter - ACL voter for permissions checking
        securityRoles - the security roles
        graphPathBean - the graph path bean
        adminPrivileges - the light administrator privileges helper
        deletionInstance - a deletion instance for deleting files
        allTargets - legal target object classes for all request classes that use the graph path bean
        allRules - rules for all request classes that use the graph path bean
        unnullable - properties that, while nullable, may not be nulled by a graph traversal operation
        defaultExcludeNs - the default value for an unset excludeNs field
        Throws:
        ome.services.graphs.GraphException - if the graph path rules could not be parsed
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
      • getGraphPathBean

        public ome.services.graphs.GraphPathBean getGraphPathBean()
        Returns:
        the graph path bean used by this instance
      • getLegalTargets

        public <R extends GraphQuery> java.util.Set<java.lang.Class<? extends ome.model.IObject>> getLegalTargets​(java.lang.Class<R> requestClass)
        Get the legal target object classes for the given request.
        Parameters:
        requestClass - a request class
        Returns:
        the legal target object classes for that type of request
      • getRequest

        public <R extends GraphQuery> R getRequest​(java.lang.Class<R> requestClass)
        Construct a request.
        Parameters:
        requestClass - a request class
        Returns:
        a new instance of that class
      • createChildOption

        public ChildOption createChildOption()
        Returns:
        an uninitialized child option instance