Class ResourceReferenceDescriptor

    • Constructor Detail

      • ResourceReferenceDescriptor

        public ResourceReferenceDescriptor​(String name,
                                           String description,
                                           String type)
        Construct a resource reference with the given name, description and type.
        Parameters:
        name - the name of the reference
        description - the description
        type - the type of the resource reference.
      • ResourceReferenceDescriptor

        public ResourceReferenceDescriptor()
        Default constructor.
    • Method Detail

      • getJndiName

        public String getJndiName()
        Return the JNDI name of this resource reference.
        Specified by:
        getJndiName in interface NamedDescriptor
        Returns:
        the JNDI name of the resource reference.
      • setJndiName

        public void setJndiName​(String jndiName)
        Set the JNDI name of this resource reference.
        Specified by:
        setJndiName in interface NamedDescriptor
        Parameters:
        jndiName - the JNDI name of the resource reference.
      • hasSharingScope

        public boolean hasSharingScope()
        Has the sharing scope been set?
        Returns:
        true if the sharing scope has been set
      • getSharingScope

        public String getSharingScope()
        Return the res-sharing-scope of this resource reference.
        Returns:
        the sharing scope.
      • setSharingScope

        public void setSharingScope​(String ss)
        Set the res-sharing-scope of this resource reference.
        Parameters:
        ss - the sharing scope.
      • isResolved

        public boolean isResolved()
        Does this resource references have a JNDI name.
        Returns:
        true if the resource reference has a JNDI name, false otherwise
      • hasAuthorization

        public boolean hasAuthorization()
        Has the authorization type been set?
        Returns:
        true if the authorization type has been set
      • isContainerAuthorization

        public boolean isContainerAuthorization()
        Return true of this resource reference is expecting the container to authorize the resource.
        Returns:
        true if authorization is container managed.
      • getAuthorization

        public String getAuthorization()
        Return the authorization type of this resource. The default value is APPLICATION_AUTHORIZATION
        Specified by:
        getAuthorization in interface ResourceReference
        Returns:
        the authorization type of the resource.
      • setAuthorization

        public void setAuthorization​(String authorization)
        Sets the authorization type of this resource.
        Specified by:
        setAuthorization in interface ResourceReference
        Parameters:
        authorization - the authorization type.
      • getJDBCDataSource

        public DataSource getJDBCDataSource()
        Lookup the datasource from the namespace based on the JNDI name.
        Returns:
        the data source
      • isWebServiceContext

        public boolean isWebServiceContext()
        Return true is the resource is of WebServiceContext type
        Returns:
      • isORB

        public boolean isORB()
        Return true is the resource is of ORB type
        Returns:
      • isMailResource

        public boolean isMailResource()
        Return true if this resource is to a JavaMail session object.
        Returns:
        true if the resource is a JavaMail session object.
      • isJDBCResource

        public boolean isJDBCResource()
        Returns:
        true if the resource is a jdbc DataSource object.
      • isURLResource

        public boolean isURLResource()
        Return true if this resource is a URL object
        Returns:
        true if the resource is a URL object, false otherwise.
        See Also:
        URL
      • isJMSConnectionFactory

        public boolean isJMSConnectionFactory()
        Return true if this resource is a JMS connection factory.
        Returns:
        true if the resource is a JMS connection factory, false otherwise.
      • getResourcePrincipal

        public ResourcePrincipal getResourcePrincipal()
        Return the identity used to authorize this resource.
        Returns:
        the principal.
      • setResourcePrincipal

        public void setResourcePrincipal​(ResourcePrincipal resourcePrincipal)
        Sets the identity used to authorize this resource.
        Parameters:
        resourcePrincipal - the principal.
      • setMailConfiguration

        public void setMailConfiguration​(MailConfiguration mailConfiguration)
        Sets the mail configuration information for this reference.
        Parameters:
        mailConfiguration - the mail configuration object.
      • addProperty

        public void addProperty​(NameValuePairDescriptor newProp)
        Add a new runtime property to this cmp resource
        Parameters:
        newProp -
      • getProperties

        public Iterator getProperties()
        Returns:
        the runtime properties for this cmp resource
      • getMailConfiguration

        public MailConfiguration getMailConfiguration()
        Return the mail configuration details of thsi resource or null.
        Returns:
        the mail configuration object.
      • isCreateTablesAtDeploy

        public boolean isCreateTablesAtDeploy()
        Returns:
        true if automatic creation of tables for the CMP Beans is done at deployment time
      • setCreateTablesAtDeploy

        public void setCreateTablesAtDeploy​(boolean createTablesAtDeploy)
        Sets whether if automatic creation of tables for the CMP Beans is done at deployment time
        Parameters:
        createTablesAtDeploy -
      • isDropTablesAtUndeploy

        public boolean isDropTablesAtUndeploy()
        Returns:
        true if automatic creation of tables for the CMP Beans is done at deployment time
      • setDropTablesAtUndeploy

        public void setDropTablesAtUndeploy​(boolean dropTablesAtUndeploy)
        Sets whether if automatic creation of tables for the CMP Beans is done at deployment time
        Parameters:
        dropTablesAtUndeploy -
      • getDatabaseVendorName

        public String getDatabaseVendorName()
        Returns:
        the database vendor name
      • setDatabaseVendorName

        public void setDatabaseVendorName​(String vendorName)
        Sets the database vendor name
        Parameters:
        vendorName -
      • getSchemaGeneratorProperties

        public Properties getSchemaGeneratorProperties()
        Returns:
        the override properties for the schema generation
      • setSchemaGeneratorProperties

        public void setSchemaGeneratorProperties​(Properties props)
        Sets the override properties for the schema generation
        Parameters:
        props -
      • print

        public void print​(StringBuilder toStringBuilder)
        Returns a formatted string representing my state.
        Overrides:
        print in class EnvironmentProperty
        Parameters:
        toStringBuilder -
      • isResourceConnectionFactory

        public boolean isResourceConnectionFactory()
        Return true if this resource is a CCI connection factory.
        Returns:
        true if the resource is a CCI connection factory, false otherwise.
      • checkType

        public void checkType()
        checks the given class type. throws an IllegalArgumentException if bounds checking if the class of type "type" does not exist