1 package org.jahia.services.version; 2 3 import java.util.HashSet ; 4 import java.util.Set ; 5 import java.util.Stack ; 6 7 import org.jahia.content.ObjectKey; 8 9 18 public class RestoreVersionStateModificationContext extends StateModificationContext { 19 20 private static org.apache.log4j.Logger logger = 21 org.apache.log4j.Logger.getLogger(RestoreVersionStateModificationContext.class); 22 23 private ContentObjectEntryState entryState; 24 25 28 private boolean undelete = false; 29 30 private int containerPageChildId = -1; 31 32 42 public RestoreVersionStateModificationContext(ObjectKey startObject, 43 Set languageCodes, 44 ContentObjectEntryState entryState) { 45 this(startObject,languageCodes,entryState,false); 46 } 47 48 62 public RestoreVersionStateModificationContext(ObjectKey startObject, 63 Set languageCodes, 64 boolean descendingInSubPages, 65 ContentObjectEntryState entryState) { 66 this(startObject, languageCodes,descendingInSubPages,entryState,false); 67 } 68 69 81 public RestoreVersionStateModificationContext(ObjectKey startObject, 82 Set languageCodes, 83 ContentObjectEntryState entryState, 84 boolean undelete) { 85 super(startObject,languageCodes); 86 this.entryState = entryState; 87 this.undelete = undelete; 88 } 89 90 105 public RestoreVersionStateModificationContext(ObjectKey startObject, 106 Set languageCodes, 107 boolean descendingInSubPages, 108 ContentObjectEntryState entryState, 109 boolean undelete) { 110 super(startObject, languageCodes,descendingInSubPages); 111 this.entryState = entryState; 112 this.undelete = undelete; 113 } 114 115 public ContentObjectEntryState getEntryState(){ 116 return this.entryState; 117 } 118 119 123 public int getVersionId(){ 124 if ( this.getEntryState() == null ){ 125 return -1; 126 } 127 return this.getEntryState().getVersionID(); 128 } 129 130 public boolean isUndelete() { 131 return undelete; 132 } 133 134 public void setUndelete(boolean undelete) { 135 this.undelete = undelete; 136 } 137 138 142 public int getContainerPageChildId() { 143 return containerPageChildId; 144 } 145 146 public void setContainerPageChildId(int containerPageChildId) { 147 this.containerPageChildId = containerPageChildId; 148 } 149 150 } 151 152 | Popular Tags |