/** * Check whether this field container is the initial version for any branch. * * @return true if it is the initial, false if not */ default boolean isInitial() { return isType(INITIAL); }
/** * Return the currently stored API token id. * * @return API token id or null if no token has yet been generated. */ default String getAPIKeyTokenCode() { return property(API_TOKEN_ID); }
/** * Return the timestamp on which the vertex was created. * * @return Creation timestamp */ default Long getCreationTimestamp() { return property(CREATION_TIMESTAMP_PROPERTY_KEY); }
/** * Set the editor and creator references and update the timestamp for created and edited fields. * * @param creator * Creator */ default void setCreated(User creator) { setCreator(creator); setCreationTimestamp(); setEditor(creator); setLastEditedTimestamp(); }
public Node getNode() { if (node == null && container != null) { node = container.getParentNode(); } return node; }
/** * Invalidate the reset token. * * @return Fluent API */ default User invalidateResetToken() { setResetToken(null); setResetTokenIssueTimestamp(null); return this; }
/** * Set the timestamp on which the vertex was last updated. * * @param timestamp * Edit timestamp */ default void setLastEditedTimestamp(long timestamp) { property(LAST_EDIT_TIMESTAMP_PROPERTY_KEY, timestamp); }
/** * Return the webroot segment info. * * @return */ default String getSegmentInfo() { return property(WEBROOT_PROPERTY_KEY); }
/** * Set the editor of the vertex. * * @param user * Editor */ default void setEditor(User user) { setLinkOut(user, HAS_EDITOR); }
/** * Set the creator of the vertex. * * @param user * Creator */ default void setCreator(User user) { setLinkOut(user, HAS_CREATOR); }
/** * Update the property webroot path info. This will also check for uniqueness conflicts of the webroot path and will throw a * {@link Errors#conflict(String, String, String, String...)} if one found. * * @param branchUuid * @param conflictI18n */ default void updateWebrootPathInfo(String branchUuid, String conflictI18n) { updateWebrootPathInfo(null, branchUuid, conflictI18n); }
/** * Reset the API token id and issue timestamp and thus invalidating the token. */ default void resetAPIToken() { setProperty(API_TOKEN_ID, null); setProperty(API_TOKEN_ISSUE_TIMESTAMP, null); }
/** * Check whether this field container is the draft version for any branch. * * @return true if it is the draft, false if not */ default boolean isDraft() { return isType(DRAFT); }
/** * Return the timestamp when the api key token code was last issued. * * @return */ default Long getAPITokenIssueTimestamp() { return property(API_TOKEN_ISSUE_TIMESTAMP); }
/** * Set the timestamp on which the vertex was created. * * @param timestamp * Creation timestamp */ default void setCreationTimestamp(long timestamp) { property(CREATION_TIMESTAMP_PROPERTY_KEY, timestamp); }
/** * Return the timestamp on which the vertex was last updated. * * @return Edit timestamp */ default Long getLastEditedTimestamp() { return property(LAST_EDIT_TIMESTAMP_PROPERTY_KEY); }
/** * Set the webroot segment info for the edge. * * @param segmentInfo */ default void setSegmentInfo(String segmentInfo) { property(WEBROOT_PROPERTY_KEY, segmentInfo); }
/** * Check whether this field container is the initial version for the given branch. * * @param branchUuid * branch Uuid * @return true if it is the initial, false if not */ default boolean isInitial(String branchUuid) { return isType(INITIAL, branchUuid); }
/** * Set the API token issue timestamp. * * @param timestamp * @return Fluent API */ default User setAPITokenIssueTimestamp(Long timestamp) { property(API_TOKEN_ISSUE_TIMESTAMP, timestamp); return this; }
/** * Check whether this field container is the published version for the given branch. * * @param branchUuid * branch Uuid * @return true if it is published, false if not */ default boolean isPublished(String branchUuid) { return isType(PUBLISHED, branchUuid); }