Skip to content

Commit

Permalink
Extract timestamp from Expirable entity
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-kanis authored and hmlnarik committed Jun 1, 2022
1 parent 6c3d25f commit 75754ec
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ public interface MapAuthenticationSessionEntity extends UpdatableEntity {
String getTabId();
void setTabId(String tabId);

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when the authentication session entity was created.
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getTimestamp();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when the authentication session entity was created.
* @param timestamp a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setTimestamp(Long timestamp);

Map<String, String> getUserSessionNotes();
void setUserSessionNotes(Map<String, String> userSessionNotes);
void setUserSessionNote(String name, String value);
Expand All @@ -44,9 +57,6 @@ public interface MapAuthenticationSessionEntity extends UpdatableEntity {
String getAuthUserId();
void setAuthUserId(String authUserId);

Long getTimestamp();
void setTimestamp(Long timestamp);

String getRedirectUri();
void setRedirectUri(String redirectUri);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ public void clearUpdatedFlag() {
String getRealmId();
void setRealmId(String realmId);

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when the root authentication session entity was created or
* updated during an authentication process.
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getTimestamp();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when the root authentication session entity was created or
* updated during an authentication process.
* @param timestamp a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setTimestamp(Long timestamp);

Set<MapAuthenticationSessionEntity> getAuthenticationSessions();
void setAuthenticationSessions(Set<MapAuthenticationSessionEntity> authenticationSessions);
Optional<MapAuthenticationSessionEntity> getAuthenticationSession(String tabId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,4 @@ public interface ExpirableEntity extends AbstractEntity {
* @param expiration a timestamp in milliseconds since The Epoch or {@code null} if this entity never expires.
*/
void setExpiration(Long expiration);

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when this entity was created or updated
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getTimestamp();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when this entity was created or updated
*
* @param timestamp a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setTimestamp(Long timestamp);
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ public void setId(String id) {

}

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when the event was created.
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getTimestamp();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when this entity was created.
* @param timestamp a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setTimestamp(Long timestamp);

String getRealmId();
void setRealmId(String realmId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ public void setId(String id) {

}

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when the event entity was created.
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getTimestamp();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when the event entity was created.
* @param timestamp a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setTimestamp(Long timestamp);

EventType getType();
void setType(EventType type);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ static ClientInitialAccessModel toModel(MapClientInitialAccessEntity entity) {
return model;
}

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when the client initial access entity was created.
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getTimestamp();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when the client initial access entity was created.
* @param timestamp a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setTimestamp(Long timestamp);

Integer getCount();
void setCount(Integer count);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ public void setId(String id) {
}
}

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when the client session entity was created or updated (refreshed).
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getTimestamp();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when the client session entity was created or updated (refreshed).
* @param timestamp a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setTimestamp(Long timestamp);

String getRealmId();
void setRealmId(String realmId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,30 @@ public void setId(String id) {
Boolean isRememberMe();
void setRememberMe(Boolean rememberMe);

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when the user session entity was created.
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getTimestamp();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when the user session entity was created.
* @param timestamp a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setTimestamp(Long timestamp);

/**
* Returns a point in time (timestamp in milliseconds since The Epoch) when the user session entity was last refreshed.
*
* @return a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
Long getLastSessionRefresh();

/**
* Sets a point in the (timestamp in milliseconds since The Epoch) when the user session entity was last refreshed.
* @param lastSessionRefresh a timestamp in milliseconds since The Epoch or {@code null} when the time is unknown
*/
void setLastSessionRefresh(Long lastSessionRefresh);

Map<String, String> getNotes();
Expand Down

0 comments on commit 75754ec

Please sign in to comment.