Class Ticket
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity<E,I>
-
- org.silverpeas.core.persistence.datasource.model.jpa.BasicJpaEntity<Ticket,UuidIdentifier>
-
- org.silverpeas.core.sharing.model.Ticket
-
- All Implemented Interfaces:
Serializable
,IdentifiableEntity
- Direct Known Subclasses:
NodeTicket
,PublicationTicket
,SimpleFileTicket
,VersionFileTicket
@Entity public abstract class Ticket extends BasicJpaEntity<Ticket,UuidIdentifier> implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Ticket.QUERY_ORDER_BY
-
Field Summary
Fields Modifier and Type Field Description protected String
componentId
protected Long
creationDate
protected String
creatorId
protected Long
endDate
static String
FILE_TYPE
protected int
nbAccess
protected int
nbAccessMax
static String
NODE_TYPE
static String
PUBLICATION_TYPE
protected long
sharedObjectId
protected String
sharedObjectType
protected Long
updateDate
protected String
updaterId
static String
VERSION_TYPE
-
Constructor Summary
Constructors Modifier Constructor Description protected
Ticket()
protected
Ticket(int sharedObjectId, String componentId, String creatorId, Date creationDate, Date endDate, int nbAccessMax)
protected
Ticket(int sharedObjectId, String componentId, UserDetail creator, Date creationDate, Date endDate, int nbAccessMax)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addDownload()
boolean
equals(Object obj)
abstract ShareableAccessControl
getAccessControl()
String
getComponentId()
Date
getCreationDate()
String
getCreatorId()
Date
getEndDate()
String
getLastModifier()
int
getNbAccess()
int
getNbAccessMax()
abstract ShareableResource
getResource()
long
getSharedObjectId()
String
getSharedObjectType()
String
getToken()
Date
getUpdateDate()
String
getUrl(javax.servlet.http.HttpServletRequest request)
int
hashCode()
boolean
isContinuous()
Is this ticket a continuous one, that is with no limitation in time and in quantity.boolean
isModified()
Is this ticket was modified?boolean
isValid()
void
setContinuous()
Sets this ticket a continuous one.void
setCreator(UserDetail creator)
void
setEndDate(Date endDate)
void
setLastModifier(UserDetail modifier)
void
setNbAccess(int nbAccess)
void
setNbAccessMax(int nbAccessMax)
void
setToken(String uuid)
void
setUpdateDate(Date updateDate)
String
toString()
-
Methods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.BasicJpaEntity
performBeforePersist, performBeforeRemove, performBeforeUpdate
-
Methods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity
getId, getNativeId, isPersisted, setId
-
-
-
-
Field Detail
-
FILE_TYPE
public static final String FILE_TYPE
- See Also:
- Constant Field Values
-
VERSION_TYPE
public static final String VERSION_TYPE
- See Also:
- Constant Field Values
-
NODE_TYPE
public static final String NODE_TYPE
- See Also:
- Constant Field Values
-
PUBLICATION_TYPE
public static final String PUBLICATION_TYPE
- See Also:
- Constant Field Values
-
sharedObjectType
protected String sharedObjectType
-
sharedObjectId
protected long sharedObjectId
-
componentId
protected String componentId
-
creatorId
protected String creatorId
-
creationDate
protected Long creationDate
-
updaterId
protected String updaterId
-
updateDate
protected Long updateDate
-
endDate
protected Long endDate
-
nbAccessMax
protected int nbAccessMax
-
nbAccess
protected int nbAccess
-
-
Constructor Detail
-
Ticket
protected Ticket()
-
Ticket
protected Ticket(int sharedObjectId, String componentId, UserDetail creator, Date creationDate, Date endDate, int nbAccessMax)
-
-
Method Detail
-
getSharedObjectId
public long getSharedObjectId()
-
getComponentId
public String getComponentId()
-
getCreatorId
public String getCreatorId()
-
setCreator
public void setCreator(UserDetail creator)
-
getCreationDate
public Date getCreationDate()
-
setLastModifier
public void setLastModifier(UserDetail modifier)
-
getLastModifier
public String getLastModifier()
-
getUpdateDate
public Date getUpdateDate()
-
setUpdateDate
public void setUpdateDate(Date updateDate)
-
getEndDate
public Date getEndDate()
-
setEndDate
public void setEndDate(Date endDate)
-
getNbAccessMax
public int getNbAccessMax()
-
setNbAccessMax
public void setNbAccessMax(int nbAccessMax)
-
getNbAccess
public int getNbAccess()
-
setNbAccess
public void setNbAccess(int nbAccess)
-
getToken
public String getToken()
-
setToken
public void setToken(String uuid)
-
getUrl
public String getUrl(javax.servlet.http.HttpServletRequest request)
-
isValid
public boolean isValid()
-
isModified
public boolean isModified()
Is this ticket was modified?- Returns:
- true if this ticket was modified, false otherwise.
-
isContinuous
public boolean isContinuous()
Is this ticket a continuous one, that is with no limitation in time and in quantity.- Returns:
- true if this ticket is a continuous one, false otherwise.
-
setContinuous
public void setContinuous()
Sets this ticket a continuous one.
-
getSharedObjectType
public String getSharedObjectType()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractJpaEntity<Ticket,UuidIdentifier>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractJpaEntity<Ticket,UuidIdentifier>
-
addDownload
public void addDownload()
-
getAccessControl
public abstract ShareableAccessControl getAccessControl()
-
getResource
public abstract ShareableResource getResource()
-
-