Time State
Time state is used to restrict access to content outside a specified time period, defined by an on time when content becomes available, and an off time when it ceases to be available. Time state is defined per view, and restricts access to the content on that view, not the content as a whole. If a content has no time state on a view, access to the view is not restricted.
Time State Aspect
Time state for a content is controlled by a content metadata aspect of type aceTimeState, which
contains a mapping from views to aceViewTimeState, which in turn has on and
off times. The on and off times are optional - if they are null or undefined, they count as the
beginning and end of time, respectively. On and off times are specifed as milliseconds since the
UNIX epoch.
{
"_type": "aceTimeState",
"views": {
"acePublic": {
"onTime": "2007-03-12T14:33:00Z",
"offTime": null
}
}
}
Time state and symbolic views
When content is resolved on a symbolic view, more than one view is involved. Time state is resolved using the first view in the resolution chain that has time state, and applying that. In other words, the time state of a target view is only used if the symbolic view pointing to it doesn't have time state.
Time state and searching
Content with timestate will automatically be filtered out from searches where the timestate applies.
Example
Suppose the view sensitive symbolically points to vip, which symbolically points to the symbolic view premium which symbolically points to the (real view) acePublic.
sensitive -> @vip -> @premium -> @acePublic
Further suppose that:
- sensitive is off
- vip has no time state
- premium is on
- acePublic is off and points to version V
Then:
- sensitive resolves to not found
- vip resolves to V (same as premium)
- premium resolves to V
- acePublic resolves to not found