com.silverpeas.sharing.model
Class Ticket

java.lang.Object
  extended by com.silverpeas.sharing.model.Ticket
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NodeTicket, PublicationTicket, SimpleFileTicket, VersionFileTicket

@Entity
public abstract class Ticket
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
protected  String componentId
           
protected  Long creationDate
           
protected  String creatorId
           
protected  List<DownloadDetail> downloads
           
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  UuidPk token
           
protected  Long updateDate
           
protected  String updaterId
           
static String VERSION_TYPE
           
 
Constructor Summary
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
 void addDownload()
           
 boolean equals(Object obj)
           
abstract  ShareableAccessControl getAccessControl()
           
 String getComponentId()
           
 Date getCreationDate()
           
 String getCreatorId()
           
 List<DownloadDetail> getDownloads()
           
 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 setDownloads(Collection<DownloadDetail> downloads)
           
 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 java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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

token

protected UuidPk token

downloads

protected List<DownloadDetail> downloads
Constructor Detail

Ticket

protected Ticket()

Ticket

protected Ticket(int sharedObjectId,
                 String componentId,
                 UserDetail creator,
                 Date creationDate,
                 Date endDate,
                 int nbAccessMax)

Ticket

protected Ticket(int sharedObjectId,
                 String componentId,
                 String creatorId,
                 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)

getDownloads

public List<DownloadDetail> getDownloads()

setDownloads

public void setDownloads(Collection<DownloadDetail> downloads)

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 class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

addDownload

public void addDownload()

getAccessControl

public abstract ShareableAccessControl getAccessControl()

getResource

public abstract ShareableResource getResource()


Copyright © 2016 Silverpeas. All Rights Reserved.