Package com.day.cq.personalization
Class Segment
java.lang.Object
com.day.cq.personalization.Segment
The
Segment class is a server-side representation of a segment which may be assigned to a user.
Since AEM segments are resolved client-side, this class makes a best-effort approach to represent the segments on the
server side, but some precision may be lost. For instance, script segments will not have their scripts loaded by this
segment, but will rather be referenced as Segment.Kind.ClientOnly segments.
This class is intended to be used, but not extended by consumers.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidgetKind()getName()getValue()static SegmentnewByPathSegment(String path) Creates a newClientOnlysegment instancestatic SegmentnewDirectSegment(String name, String operator, String value) static SegmentnewDirectSegment(String name, String operator, List<String> values) static SegmentnewExternalReferenceSegment(String name, String operator, String externalId) static SegmentnewLogicSegment(Segment.Kind kind) toString()
-
Field Details
-
NAME_PERCENTILE
- See Also:
-
-
Method Details
-
newLogicSegment
-
newDirectSegment
-
newDirectSegment
-
newExternalReferenceSegment
-
newByPathSegment
Creates a newClientOnlysegment instance- Parameters:
path- the repository location of the segment- Returns:
- a new segment instance
-
getKind
-
getName
-
getOperator
-
getValue
-
getChildren
-
addChild
-
toString
-