public final class NoticeAttributes extends AbstractAttributeGroup
| Attributes |
|---|
|
ISM:noticeType: (optional) ISM:noticeReason: (optional) ISM:noticeDate: (optional) ISM:unregisteredNoticeType: (optional) ISM:externalNotice: (optional, starting in DDMS 4.1) |
| Modifier and Type | Class and Description |
|---|---|
static class |
NoticeAttributes.Builder
Builder for these attributes.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
EXTERNAL_NOTICE_NAME
Attribute name
|
static int |
MAX_LENGTH
Maximum length of reason and unregistered notice type attributes.
|
static Set<String> |
NON_EXTENSIBLE_NAMES
A set of all SecurityAttribute names which should not be converted into ExtensibleAttributes
|
static String |
NOTICE_DATE_NAME
Attribute name
|
static String |
NOTICE_REASON_NAME
Attribute name
|
static String |
NOTICE_TYPE_NAME
Attribute name
|
static String |
UNREGISTERED_NOTICE_TYPE_NAME
Attribute name
|
| Constructor and Description |
|---|
NoticeAttributes(nu.xom.Element element)
Base constructor
|
NoticeAttributes(String noticeType,
String noticeReason,
String noticeDate,
String unregisteredNoticeType)
Deprecated.
A new constructor was added for DDMS 4.1 to support ism:externalNotice. This constructor is preserved for
backwards compatibility, but may disappear in the next major release.
|
NoticeAttributes(String noticeType,
String noticeReason,
String noticeDate,
String unregisteredNoticeType,
Boolean externalNotice)
Constructor which builds from raw data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTo(nu.xom.Element element)
Convenience method to add these attributes onto an existing XOM Element
|
boolean |
equals(Object obj) |
static NoticeAttributes |
getNonNullInstance(NoticeAttributes noticeAttributes)
Returns a non-null instance of notice attributes.
|
javax.xml.datatype.XMLGregorianCalendar |
getNoticeDate()
Accessor for the noticeDate attribute.
|
String |
getNoticeReason()
Accessor for the noticeReason attribute.
|
String |
getNoticeType()
Accessor for the noticeType attribute.
|
String |
getOutput(boolean isHTML,
String prefix)
Outputs to HTML or Text with a prefix at the beginning of each meta tag or line.
|
String |
getUnregisteredNoticeType()
Accessor for the unregisteredNoticeType attribute.
|
int |
hashCode() |
boolean |
isEmpty()
Checks if any attributes have been set.
|
Boolean |
isExternalReference()
Accessor for the externalNotice attribute.
|
protected void |
validate()
Validates the attribute group.
|
getDDMSVersion, getValidationWarnings, getWarnings, validateSameVersionpublic static final String NOTICE_TYPE_NAME
public static final String NOTICE_REASON_NAME
public static final String NOTICE_DATE_NAME
public static final String UNREGISTERED_NOTICE_TYPE_NAME
public static final String EXTERNAL_NOTICE_NAME
public static final int MAX_LENGTH
public static final Set<String> NON_EXTENSIBLE_NAMES
public NoticeAttributes(nu.xom.Element element)
throws InvalidDDMSException
element - the XOM element which is decorated with these attributes.InvalidDDMSExceptionpublic NoticeAttributes(String noticeType,
String noticeReason,
String noticeDate,
String unregisteredNoticeType)
throws InvalidDDMSException
noticeType - the notice type (with a value from the CVE)noticeReason - the reason associated with a noticenoticeDate - the date associated with a noticeunregisteredNoticeType - a notice type not in the CVEInvalidDDMSException - if any required information is missing or malformedpublic NoticeAttributes(String noticeType,
String noticeReason,
String noticeDate,
String unregisteredNoticeType,
Boolean externalNotice)
throws InvalidDDMSException
noticeType - the notice type (with a value from the CVE)noticeReason - the reason associated with a noticenoticeDate - the date associated with a noticeunregisteredNoticeType - a notice type not in the CVEexternalNotice - true if this notice is for an external resourceInvalidDDMSException - if any required information is missing or malformedpublic static NoticeAttributes getNonNullInstance(NoticeAttributes noticeAttributes) throws InvalidDDMSException
noticeAttributes - the attributes to return by defaultInvalidDDMSException - if there are problems creating the empty attributes instancepublic void addTo(nu.xom.Element element)
throws InvalidDDMSException
element - the element to decorateInvalidDDMSExceptionpublic boolean isEmpty()
protected void validate()
throws InvalidDDMSException
ISMVocabulary enumerations are validated.
| Rules |
|---|
|
|
validate in class AbstractAttributeGroupInvalidDDMSException - if any required information is missing or malformedpublic String getOutput(boolean isHTML,
String prefix)
AbstractAttributeGroupgetOutput in class AbstractAttributeGroupisHTML - true for HTML, false for Textprefix - the prefix to addAbstractAttributeGroup.getOutput(boolean, String)public boolean equals(Object obj)
equals in class ObjectObject.equals(Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public String getNoticeType()
public String getNoticeReason()
public String getUnregisteredNoticeType()
public Boolean isExternalReference()
public javax.xml.datatype.XMLGregorianCalendar getNoticeDate()
Copyright 2010 - 2013 by Brian Uri!
Generated on 12/15/2013 10:22 AM
http://ddmsence.urizone.net/