Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revision meta data #137

Merged
merged 4 commits into from
Aug 31, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revision meta data
vapadwal committed Aug 22, 2019
commit 6e94557f2b606a4fbd51e2cf30692e905faa779d
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
* {@link com.devonfw.module.basic.common.api.entity.RevisionedEntity#getRevision() historic revision} of an
* {@link com.devonfw.module.basic.common.api.entity.RevisionedEntity revisioned entity}.
*
* @since 3.0.0
* @since 3.2.0
*/
public interface RevisionMetadata {

@@ -33,6 +33,6 @@ public interface RevisionMetadata {
*
* @return the author. May be {@code null} (if committed outside user scope).
*/
String getUserLogin();
String getAuthor();

}
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ public class RevisionMetadataType implements RevisionMetadata {

private final Date date;

private final String userLogin;
private final String author;

/**
* The constructor.
@@ -20,11 +20,11 @@ public class RevisionMetadataType implements RevisionMetadata {
* @param date the {@link #getDate() date}.
* @param author the {@link #getAuthor() author}.
*/
public RevisionMetadataType(Number revision, Date date, String userLogin) {
public RevisionMetadataType(Number revision, Date date, String author) {

this.revision = revision;
this.date = date;
this.userLogin = userLogin;
this.author = author;
}

@Override
@@ -40,15 +40,15 @@ public Date getDate() {
}

@Override
public String getUserLogin() {
public String getAuthor() {

return this.userLogin;
return this.author;
}

@Override
public String toString() {

return this.revision + "@" + this.date + " by " + this.userLogin;
return this.revision + "@" + this.date + " by " + this.author;
}

}
Original file line number Diff line number Diff line change
@@ -2,40 +2,16 @@
* http://www.apache.org/licenses/LICENSE-2.0 */
package com.devonfw.module.jpa.dataaccess.api;

import java.util.Date;

/**
* @Deprecated use {@link com.devonfw.module.basic.common.api.RevisionMetadata} instead.
* @deprecated use {@link com.devonfw.module.basic.common.api.RevisionMetadata} instead.
*
* This is the interface for the metadata associated with a
* {@link com.devonfw.module.basic.common.api.entity.RevisionedEntity#getRevision() historic revision} of an
* {@link com.devonfw.module.basic.common.api.entity.RevisionedEntity revisioned entity}.
* This is the interface for the metadata associated with a
* {@link com.devonfw.module.basic.common.api.entity.RevisionedEntity#getRevision() historic revision} of an
* {@link com.devonfw.module.basic.common.api.entity.RevisionedEntity revisioned entity}.
*
* @since 3.0.0
*/
@Deprecated
public interface RevisionMetadata {

/**
* This method gets the {@link com.devonfw.module.basic.common.api.entity.RevisionedEntity#getRevision() revision
* number}.
*
* @return the revision number.
*/
Number getRevision();

/**
* This method gets the date when this revision was created (closed).
*
* @return the date of completion or {@code null} if the according entity is the latest revision.
*/
Date getDate();

/**
* This method gets the identifier (login) of the author who created this revision.
*
* @return the author. May be {@code null} (if committed outside user scope).
*/
String getAuthor();
public interface RevisionMetadata extends com.devonfw.module.basic.common.api.RevisionMetadata {

}
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@
import java.util.Date;

/**
* @Deprecated use {@link com.devonfw.module.basic.common.api.RevisionMetadataType} instead.
* @deprecated use {@link com.devonfw.module.basic.common.api.RevisionMetadataType} instead.
*
* Implementation of {@link RevisionMetadata} as immutable type.
* Implementation of {@link RevisionMetadata} as immutable type.
*/
@Deprecated
public class RevisionMetadataType implements RevisionMetadata {