Package sop
Class Profile
- java.lang.Object
-
- sop.Profile
-
public class Profile extends java.lang.Object
Tuple class bundling a profile name and description.- See Also:
- SOP Spec - Profile
-
-
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 aProfile
from its string representation.java.lang.String
toString()
Convert the profile into a String for displaying.
-
-
-
Constructor Detail
-
Profile
public Profile(@Nonnull java.lang.String name, @Nullable java.lang.String description)
Create a newProfile
object. ThetoString()
representation MUST NOT exceed a length of 1000 bytes.- Parameters:
name
- profile namedescription
- profile description
-
Profile
public Profile(java.lang.String name)
-
-
Method Detail
-
parse
public static Profile parse(java.lang.String string)
Parse aProfile
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 stringrfc
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 stringdraft-
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 classjava.lang.Object
- Returns:
- string
-
-