Skip to content

Commit

Permalink
fixup! fixup! refactor StateFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Jan 9, 2025
1 parent 5337e9a commit 87b9ecc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@
import com.redhat.rhn.domain.server.ansible.InventoryPath;
import com.redhat.rhn.domain.server.ansible.PlaybookPath;
import com.redhat.rhn.domain.server.virtualhostmanager.VirtualHostManagerNodeInfo;
import com.redhat.rhn.domain.state.OrgStateRevision;
import com.redhat.rhn.domain.state.ServerGroupStateRevision;
import com.redhat.rhn.domain.state.ServerStateRevision;
import com.redhat.rhn.domain.state.StateRevision;
import com.redhat.rhn.domain.task.Task;
import com.redhat.rhn.domain.token.Token;
import com.redhat.rhn.domain.token.TokenChannelAppStream;
Expand Down Expand Up @@ -225,6 +229,7 @@ private AnnotationRegistry() {
OrgAdminManagement.class,
Org.class,
OrgConfig.class,
OrgStateRevision.class,
OrgRecurringAction.class,
PackageArch.class,
PackageBreaks.class,
Expand Down Expand Up @@ -276,13 +281,16 @@ private AnnotationRegistry() {
ServerCoCoAttestationReport.class,
ServerGroup.class,
ServerGroupManager.class,
ServerGroupStateRevision.class,
ServerGroupType.class,
ServerPath.class,
ServerPathId.class,
ServerStateRevision.class,
SoftwareEnvironmentTarget.class,
SoftwareProjectSource.class,
SslCryptoKey.class,
StateChange.class,
StateRevision.class,
SUSEProductSCCRepository.class,
Task.class,
TemplateString.class,
Expand Down
18 changes: 18 additions & 0 deletions java/code/src/com/redhat/rhn/domain/state/StateRevision.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@
import java.util.List;
import java.util.Set;

import javax.persistence.Transient;

/**
* A generic state revision to be subclassed for instance as {@link ServerStateRevision}.
*/
public class StateRevision {

private long id;
@Transient
private Date created;
private User creator;
private Set<PackageState> packageStates = new HashSet<>();
private List<ConfigChannel> configChannels = new ArrayList<>();
Expand All @@ -51,6 +55,20 @@ public void setId(long idIn) {
this.id = idIn;
}

/**
* @return the created
*/
public Date getCreated() {
return created;
}

/**
* @param createdIn the created to set
*/
public void setCreated(Date createdIn) {
this.created = createdIn;
}

/**
* @return the creator
*/
Expand Down

0 comments on commit 87b9ecc

Please sign in to comment.