|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.irm.engine.core.general.LabelOperationsInstance
public final class LabelOperationsInstance
Operations on labels. Provides utilities for working with labels and collections of labels.
This class provides static methods for a set of procedural style methods. The methods can be made to appear as global methods by using import static. e.g.
import static oracle.irm.engine.core.general.LabelOperationsInstance.*;
Method Summary | |
---|---|
static Collection<Label> |
copyLabels(Collection<Label> labels, int length) Copy a set of labels. |
static Label |
getLabel(Collection<Label> labels, Locale[] locales) Get a label from a collection. |
static Label |
getUnknownLabel(Locale locale) Get the unknown label. |
static Collection<Label> |
sortLabels(Collection<Label> labels, Locale[] locales) Sort labels into a locale preference order. |
static void |
validateLabel(Label label, int name, int description) Validate the name and description lengths of a label. |
static void |
validateLabels(Collection<Label> labels, int name, int description) Validate the name and description lengths of a set of label values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Label getLabel(Collection<Label> labels, Locale[] locales)
labels
- the set of labels. This parameter is optional, it is valid to pass null or an empty collection.locales
- locales. The labels are searched in the same order as the provided array.public static Label getUnknownLabel(Locale locale)
locale
- locale. The locale required.public static Collection<Label> copyLabels(Collection<Label> labels, int length)
Name
property is also changed to reflect the label has been copied. For example, in English, the label Top Secret would turn into Copy Of Top Secret. If the new label name exceeds the maximum length provided the copied name is truncated.labels
- the set of labels to copy. This parameter is optional, it is valid to pass null or an empty collection.length
- maximum label name size. Set the size to 0 if there is no limit of the length of the name.public static Collection<Label> sortLabels(Collection<Label> labels, Locale[] locales)
labels
- the set of labels to sort. This parameter is optional, it is valid to pass null or an empty collection.locales
- the locale(s) sort order. If no locales are specified, the default locale is used as the only sort criteria. This parameter is optional, it is valid to pass null.public static void validateLabels(Collection<Label> labels, int name, int description) throws IllegalArgumentException
labels
- labels to validate. This parameter is optional, it is valid to pass null or an empty collection.name
- maximum name size.description
- maximum description size. Ignored if a label does not have a maximum size.IllegalArgumentException
- if either the name or description have invalid lengths.public static void validateLabel(Label label, int name, int description) throws IllegalArgumentException
label
- label to validate.name
- maximum name size.description
- maximum description size. Ignored if a label does not have a description.IllegalArgumentException
- if either the name or description have invalid lengths.
|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |