Package com.logicaldoc.core.ticket
Class Ticket
java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.ticket.Ticket
- All Implemented Interfaces:
Serializable
Represents ticket, most of the time this is used to model download tickets.
- Author:
- Michael Scholz, Marco Meschieri
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetCount()longgetDocId()intgetType()getUrl()longintgetViews()inthashCode()booleanbooleanbooleanvoidsetCount(int count) voidsetDecodedPassword(String pwd) Sets the password and encode itvoidsetDocId(long docId) voidsetEnabled(boolean enabled) voidsetExpired(Date expired) voidsetExpireHours(Integer expireHours) voidsetMaxCount(Integer maxCount) voidsetMaxViews(Integer maxViews) voidsetPassword(String pwd) voidvoidsetTicketId(String ticketId) voidsetType(int type) voidvoidsetUserId(long userId) voidsetViews(int views) Methods inherited from class com.logicaldoc.core.PersistentObject
getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString
-
Field Details
-
DOWNLOAD
public static final int DOWNLOAD- See Also:
-
PSW_RECOVERY
public static final int PSW_RECOVERY- See Also:
-
VIEW
public static final int VIEW- See Also:
-
-
Constructor Details
-
Ticket
public Ticket()
-
-
Method Details
-
getDocId
public long getDocId() -
setDocId
public void setDocId(long docId) -
getTicketId
- Returns:
- Returns the ticketId.
-
setTicketId
- Parameters:
ticketId- The ticketId to set.
-
getUserId
public long getUserId() -
setUserId
public void setUserId(long userId) -
getType
public int getType() -
setType
public void setType(int type) -
getExpired
-
setExpired
-
getCount
public int getCount() -
setCount
public void setCount(int count) -
isTicketExpired
public boolean isTicketExpired() -
isTicketViewExpired
public boolean isTicketViewExpired() -
getSuffix
-
setSuffix
-
getUrl
-
setUrl
-
getMaxCount
-
setMaxCount
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) -
getViews
public int getViews() -
setViews
public void setViews(int views) -
getMaxViews
-
setMaxViews
-
getExpireHours
-
setExpireHours
-
getPassword
-
setPassword
-
setDecodedPassword
Sets the password and encode it- Parameters:
pwd- The password in readable format- Throws:
NoSuchAlgorithmException- Crypting error
-
getDecodedPassword
-
hashCode
public int hashCode()- Overrides:
hashCodein classPersistentObject
-
equals
- Overrides:
equalsin classPersistentObject
-