Class DirectCOSDefinition

    • Constructor Detail

      • DirectCOSDefinition

        public DirectCOSDefinition()
        NoArg Constructor
      • DirectCOSDefinition

        public DirectCOSDefinition​(AttrSet attrSet)
                            throws UMSException
        Constructor with attribute set argument. The attribute set needs to contain all the required attributes for this definition: name, cosspecifier, cosattribute (with qualifier).
        Parameters:
        attrSet - the attribute set
        Throws:
        UMSException - The exception thrown from the DirectCOSDefinition constructor accepting a creation template and attribute set.
        See Also:
        (CreationTemplate, AttrSet)
      • DirectCOSDefinition

        public DirectCOSDefinition​(CreationTemplate template,
                                   AttrSet attrSet)
                            throws UMSException
        Constructor with creation template and attribute set arguments.
        Parameters:
        template - the Creation template.
        attrSet - the attribute set
        Throws:
        UMSException - The exception thrown from the parent class constructor.
        See Also:
        (CreationTemplate, AttrSet)
    • Method Detail

      • setName

        public void setName​(String name)
        Sets the name of this COS.
        Specified by:
        setName in interface ICOSDefinition
        Parameters:
        name - the name of this COS.
      • getName

        public String getName()
        Returns the name of this COS.
        Specified by:
        getName in interface ICOSDefinition
        Returns:
        the name of this COS
      • addCOSAttribute

        public void addCOSAttribute​(String attrName,
                                    int qualifier)
                             throws UMSException
        Adds the COS attribute to the definition. The COS attribute is the name of the attribute for which you want to generate a value.
        Specified by:
        addCOSAttribute in interface ICOSDefinition
        Parameters:
        attrName - The name of the attribute (for example, mailQuota)
        qualifier - An integer representing the following values: "default" - The server only returns a generated value if there is no corresponding attribute value stored with the entry. "override" - This value will always be generated by the server (it will override entry values). "operational" - the attribute will only be returned if it is requested in the search. "operational" can be combined with "default" or "override". These values are represented as integers in the ICOSDefinition interface.
        Throws:
        UMSException - The exception thrown from the data layer.
      • removeCOSAttribute

        public void removeCOSAttribute​(String attrName)
        Removes the COS attribute from the definition.
        Specified by:
        removeCOSAttribute in interface ICOSDefinition
        Parameters:
        attrName - The name of the attribute to be removed.
      • getCOSAttributes

        public String[] getCOSAttributes()
        Retrieves the COS attributes for this definition.
        Specified by:
        getCOSAttributes in interface ICOSDefinition
        Returns:
        String[] A string array of COS attributes (for example, mailquota).
      • setCOSSpecifier

        public void setCOSSpecifier​(String cosSpecifier)
        Sets the COS specifier. The COS specifier is the attribute value used in conjunction with the template entry's DN, to identify the template entry.
        Parameters:
        cosSpecifier - The COS specifier.
      • addCOSTemplate

        public void addCOSTemplate​(COSTemplate cosTemplate)
                            throws UMSException
        Adds a COS Template to this COS definition. This COS definition must be persistent before adding the template.
        Parameters:
        cosTemplate - The COS Template to be added.
        Throws:
        UMSException - The exception thrown from the data layer.
      • removeCOSTemplate

        public void removeCOSTemplate​(String name)
                               throws UMSException
        Removes a COS Template from this COS definition.
        Parameters:
        name - The name of the template to be removed.
        Throws:
        UMSException - The exception thrown from the data layer.
      • removeCOSTemplates

        public void removeCOSTemplates()
                                throws UMSException
        Removes all COS Templates from this COS definition.
        Throws:
        UMSException - The exception thrown from the data layer.
      • getCOSTemplate

        public COSTemplate getCOSTemplate​(String name)
                                   throws COSNotFoundException,
                                          UMSException
        Returns a template from this definition given the name of the template.
        Parameters:
        name - The name of the template to be returned.
        Returns:
        The COS template.
        Throws:
        COSNotFoundException - The exception thrown if the COS template is not found.
        UMSException - The exception thrown from the data layer.
      • getCOSTemplates

        public Collection getCOSTemplates()
                                   throws UMSException
        Returns all templates for this definition.
        Returns:
        a collection of COS templates
        Throws:
        UMSException - The exception thrown from the data layer.