Package sop

Class Profile


  • public class Profile
    extends java.lang.Object
    Tuple class bundling a profile name and description.
    See Also:
    SOP Spec - Profile
    • Constructor Summary

      Constructors 
      Constructor Description
      Profile​(java.lang.String name)  
      Profile​(java.lang.String name, java.lang.String description)
      Create a new Profile object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Optional<java.lang.String> getDescription()
      Return a free-form description of the profile.
      java.lang.String getName()
      Return the name (also known as identifier) of the profile.
      boolean hasDescription()  
      static Profile parse​(java.lang.String string)
      Parse a Profile from its string representation.
      java.lang.String toString()
      Convert the profile into a String for displaying.
      • Methods inherited from class java.lang.Object

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

      • Profile

        public Profile​(@Nonnull
                       java.lang.String name,
                       @Nullable
                       java.lang.String description)
        Create a new Profile object. The toString() representation MUST NOT exceed a length of 1000 bytes.
        Parameters:
        name - profile name
        description - profile description
      • Profile

        public Profile​(java.lang.String name)
    • Method Detail

      • parse

        public static Profile parse​(java.lang.String string)
        Parse a Profile from its string representation.
        Parameters:
        string - string representation
        Returns:
        profile
      • getName

        @Nonnull
        public java.lang.String getName()
        Return the name (also known as identifier) of the profile. A profile name is a UTF-8 string that has no whitespace in it. Similar to OpenPGP Notation names, profile names are divided into two namespaces: The IETF namespace and the user namespace. A profile name in the user namespace ends with the
        @
        character (0x40) followed by a DNS domain name. A profile name in the IETF namespace does not have an
        @
        character. A profile name in the user space is owned and controlled by the owner of the domain in the suffix. A profile name in the IETF namespace that begins with the string
        rfc
        should have semantics that hew as closely as possible to the referenced RFC. Similarly, a profile name in the IETF namespace that begins with the string
        draft-
        should have semantics that hew as closely as possible to the referenced Internet Draft.
        Returns:
        name
      • getDescription

        @Nonnull
        public Optional<java.lang.String> getDescription()
        Return a free-form description of the profile.
        Returns:
        description
      • hasDescription

        public boolean hasDescription()
      • toString

        public java.lang.String toString()
        Convert the profile into a String for displaying.
        Overrides:
        toString in class java.lang.Object
        Returns:
        string