org.silverpeas.sharing.web
Class TicketEntity

java.lang.Object
  extended by org.silverpeas.sharing.web.TicketEntity
All Implemented Interfaces:
Exposable, Serializable

public class TicketEntity
extends Object
implements Exposable

See Also:
Serialized Form

Field Summary
protected  String additionalMessage
           
protected  String componentId
          Main sharing ticket attributes
protected  Long creationDate
           
protected  String creatorId
           
protected  List<DownloadDetail> downloads
           
protected  Long endDate
           
protected  String endDateFormat
           
protected  String endDateStr
           
protected  String externalEmails
           
protected  int nbAccess
           
protected  int nbAccessMax
           
protected  long sharedObjectId
           
protected  String sharedObjectType
           
protected  String token
           
protected  Long updateDate
           
protected  String updaterId
           
protected  String url
           
protected  String users
          Notification parameter
protected  String validity
           
 
Constructor Summary
protected TicketEntity()
          Default constructor
  TicketEntity(Ticket ticket, URI uri)
           
 
Method Summary
 boolean equals(Object obj)
           
static TicketEntity fromTicket(Ticket ticket, URI uri)
           
 String getAdditionalMessage()
           
 String getComponentId()
           
 Long getCreationDate()
           
 String getCreatorId()
           
 List<DownloadDetail> getDownloads()
           
 Long getEndDate()
           
 String getEndDateFormat()
           
 String getEndDateStr()
           
 String getExternalEmails()
           
 int getNbAccess()
           
 int getNbAccessMax()
           
 long getSharedObjectId()
           
 String getSharedObjectType()
           
 String getToken()
           
 Long getUpdateDate()
           
 String getUpdaterId()
           
 URI getURI()
          Gets the URI at which this resource is published and can be accessed.
 String getUrl()
           
 String getUsers()
           
 String getValidity()
           
 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 setAdditionalMessage(String additionalMessage)
           
 void setComponentId(String componentId)
           
 void setContinuous()
          Sets this ticket a continuous one.
 void setCreationDate(Long creationDate)
           
 void setCreatorId(String creatorId)
           
 void setDownloads(Collection<DownloadDetail> downloads)
           
 void setDownloads(List<DownloadDetail> downloads)
           
 void setEndDate(Long endDate)
           
 void setEndDateFormat(String endDateFormat)
           
 void setEndDateStr(String endDateStr)
           
 void setExternalEmails(String externalEmails)
           
 void setNbAccess(int nbAccess)
           
 void setNbAccessMax(int nbAccessMax)
           
 void setSharedObjectId(long sharedObjectId)
           
 void setSharedObjectType(String sharedObjectType)
           
 void setToken(String token)
           
 void setUpdateDate(Long updateDate)
           
 void setUpdaterId(String updaterId)
           
 void setUrl(String url)
           
 void setUsers(String users)
           
 void setValidity(String validity)
           
 Ticket toTicket(UserDetail user)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentId

@NotNull
protected String componentId
Main sharing ticket attributes


sharedObjectType

@NotNull
protected String sharedObjectType

sharedObjectId

@NotNull
protected long sharedObjectId

creatorId

protected String creatorId

creationDate

protected Long creationDate

updaterId

protected String updaterId

updateDate

protected Long updateDate

validity

protected String validity

endDate

protected Long endDate

endDateStr

protected String endDateStr

endDateFormat

protected String endDateFormat

nbAccessMax

@NotNull
protected int nbAccessMax

nbAccess

protected int nbAccess

token

protected String token

downloads

protected List<DownloadDetail> downloads

url

protected String url

users

protected String users
Notification parameter


externalEmails

protected String externalEmails

additionalMessage

protected String additionalMessage
Constructor Detail

TicketEntity

protected TicketEntity()
Default constructor


TicketEntity

public TicketEntity(Ticket ticket,
                    URI uri)
Method Detail

fromTicket

public static TicketEntity fromTicket(Ticket ticket,
                                      URI uri)

toTicket

public Ticket toTicket(UserDetail user)
                throws ParseException
Throws:
ParseException

getComponentId

public String getComponentId()
Returns:
the componentId

setComponentId

public void setComponentId(String componentId)
Parameters:
componentId - the componentId to set

getSharedObjectType

public String getSharedObjectType()
Returns:
the sharedObjectType

setSharedObjectType

public void setSharedObjectType(String sharedObjectType)
Parameters:
sharedObjectType - the sharedObjectType to set

getSharedObjectId

public long getSharedObjectId()
Returns:
the sharedObjectId

setSharedObjectId

public void setSharedObjectId(long sharedObjectId)
Parameters:
sharedObjectId - the sharedObjectId to set

getCreatorId

public String getCreatorId()
Returns:
the creatorId

setCreatorId

public void setCreatorId(String creatorId)
Parameters:
creatorId - the creatorId to set

getCreationDate

public Long getCreationDate()
Returns:
the creationDate

setCreationDate

public void setCreationDate(Long creationDate)
Parameters:
creationDate - the creationDate to set

getUpdaterId

public String getUpdaterId()
Returns:
the updaterId

setUpdaterId

public void setUpdaterId(String updaterId)
Parameters:
updaterId - the updaterId to set

getUpdateDate

public Long getUpdateDate()
Returns:
the updateDate

setUpdateDate

public void setUpdateDate(Long updateDate)
Parameters:
updateDate - the updateDate to set

getValidity

public String getValidity()
Returns:
the validity

setValidity

public void setValidity(String validity)
Parameters:
validity - the validity to set

getEndDate

public Long getEndDate()
Returns:
the endDate

setEndDate

public void setEndDate(Long endDate)
Parameters:
endDate - the endDate to set

getEndDateStr

public String getEndDateStr()
Returns:
the endDateStr

setEndDateStr

public void setEndDateStr(String endDateStr)
Parameters:
endDateStr - the endDateStr to set

getEndDateFormat

public String getEndDateFormat()
Returns:
the endDateFormat

setEndDateFormat

public void setEndDateFormat(String endDateFormat)
Parameters:
endDateFormat - the endDateFormat to set

getNbAccessMax

public int getNbAccessMax()
Returns:
the nbAccessMax

setNbAccessMax

public void setNbAccessMax(int nbAccessMax)
Parameters:
nbAccessMax - the nbAccessMax to set

getNbAccess

public int getNbAccess()
Returns:
the nbAccess

setNbAccess

public void setNbAccess(int nbAccess)
Parameters:
nbAccess - the nbAccess to set

getToken

public String getToken()
Returns:
the token

setToken

public void setToken(String token)
Parameters:
token - the token to set

getUsers

public String getUsers()
Returns:
the users

setUsers

public void setUsers(String users)
Parameters:
users - the users to set

getExternalEmails

public String getExternalEmails()
Returns:
the externalEmails

setExternalEmails

public void setExternalEmails(String externalEmails)
Parameters:
externalEmails - the externalEmails to set

getAdditionalMessage

public String getAdditionalMessage()
Returns:
the additionalMessage

setAdditionalMessage

public void setAdditionalMessage(String additionalMessage)
Parameters:
additionalMessage - the additionalMessage to set

getUrl

public String getUrl()
Returns:
the url

setUrl

public void setUrl(String url)
Parameters:
url - the url to set

setDownloads

public void setDownloads(List<DownloadDetail> downloads)
Parameters:
downloads - the downloads to set

getDownloads

public List<DownloadDetail> getDownloads()

setDownloads

public void setDownloads(Collection<DownloadDetail> downloads)

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.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

getURI

public URI getURI()
Description copied from interface: Exposable
Gets the URI at which this resource is published and can be accessed.

Specified by:
getURI in interface Exposable
Returns:
the web resource URI.


Copyright © 2016 Silverpeas. All Rights Reserved.