Package tigase.vhosts

Class VHostJDBCRepository

    • Constructor Detail

      • VHostJDBCRepository

        public VHostJDBCRepository()
    • Method Detail

      • destroy

        public void destroy()
        Description copied from interface: ComponentRepository
        Method destroys this instance of ComponentRepository releasing resources allocated for this instance of ComponentRepository if possible
        Specified by:
        destroy in interface ComponentRepository<VHostItem>
      • initRepository

        @Deprecated
        public void initRepository​(java.lang.String resource_uri,
                                   java.util.Map<java.lang.String,​java.lang.String> params)
                            throws DBInitException
        Deprecated.
        Description copied from interface: Repository
        Method is deprecated and should not be user any more.
        The method is called to initialize the data repository. Depending on the implementation all the initialization parameters can be passed either via resource_uri parameter as the database connection string or via params map if the required repository parameters are more complex or both.
        Specified by:
        initRepository in interface Repository
        Parameters:
        resource_uri - value in most cases representing the database connection string.
        params - is a Map with repository properties necessary to initialize and perform all the functions. The initialization parameters are implementation dependent.
        Throws:
        DBInitException - if there was an error during repository initialization. Some implementations, though, perform so called lazy initialization so even though there is a problem with the underlying repository it may not be signaled through this method call.
      • reload

        public void reload()
        Description copied from interface: ComponentRepository
        This method is called to reload items from the database or other permanent storage. It is possible that items list is modified externally by third-party system. When all modifications are done this method is called to refresh the class cache. Whether the implementation load whole list or just last modifications is implementation dependent.
        Specified by:
        reload in interface ComponentRepository<VHostItem>
        Overrides:
        reload in class UserRepoRepository<VHostItem>
      • addItemNoStore

        public void addItemNoStore​(VHostItem item)
        Description copied from interface: ComponentRepository
        The method adds a new or updates existing Item. It needs to have all fields set correctly. After this method call is finished a new added item must be available in the component repository. The method adds the item to memory cache but not to a permanent storage.
        Specified by:
        addItemNoStore in interface ComponentRepository<VHostItem>
        Overrides:
        addItemNoStore in class ConfigRepository<VHostItem>
        Parameters:
        item - a Item with all it's configuration parameters.
      • setDef_srv_address

        public void setDef_srv_address​(java.lang.String address)
      • validateItem

        public java.lang.String validateItem​(VHostItem item)
        Description copied from interface: ComponentRepository
        Performs Item validation to check whether it meets the repository policy. If validation is successful the method returns null, otherwise it returns an error description.
        Specified by:
        validateItem in interface ComponentRepository<VHostItem>
        Overrides:
        validateItem in class ConfigRepository<VHostItem>
        Parameters:
        item - is an Item object to perform validation checking upon.
        Returns:
        null on success and an error message otherwise.
      • getMainVHostName

        public java.lang.String getMainVHostName()
      • setMainVHostName

        public void setMainVHostName​(java.lang.String vhost)
      • setVhostDefaultValues

        public void setVhostDefaultValues​(VHostItemDefaults vhostDefaultValues)