org.olat.repository
Class RepositoryEntry

java.lang.Object
  extended by org.olat.core.commons.persistence.PersistentObject
      extended by org.olat.repository.RepositoryEntry
All Implemented Interfaces:
java.io.Serializable, CreateInfo, ModifiedInfo, OLATResourceable, Persistable

public class RepositoryEntry
extends PersistentObject
implements ModifiedInfo, OLATResourceable

Represents a repository entry.

See Also:
Serialized Form

Field Summary
static int ACC_OWNERS
          limit access to owners
static int ACC_OWNERS_AUTHORS
          limit access to owners and authors
static int ACC_USERS
          limit access to owners, authors and users
static int ACC_USERS_GUESTS
          no limits
 
Method Summary
 int getAccess()
           
 boolean getCanCopy()
           
 boolean getCanDownload()
           
 boolean getCanLaunch()
           
 boolean getCanReference()
           
 java.lang.String getDescription()
           
 java.lang.String getDisplayname()
           
 long getDownloadCounter()
           
 java.lang.String getFormattedDescription()
           
 java.lang.String getInitialAuthor()
           
 java.util.Date getLastModified()
           
 java.util.Date getLastUsage()
           
 long getLaunchCounter()
           
 java.util.List<MetaDataElement> getMetaDataElements()
           
 OLATResource getOlatResource()
           
 SecurityGroup getOwnerGroup()
           
 java.lang.Long getResourceableId()
           
 java.lang.String getResourceableTypeName()
           
 java.lang.String getResourcename()
           
 java.lang.String getSoftkey()
           
 int getStatusCode()
           
 int getVersion()
           
 void incrementDownloadCounter()
          Increment download counter.
 void incrementLaunchCounter()
          Increment launch counter.
 void setAccess(int i)
          Set access restrictions.
 void setCanCopy(boolean b)
           
 void setCanDownload(boolean b)
           
 void setCanLaunch(boolean b)
           
 void setCanReference(boolean b)
           
 void setDescription(java.lang.String description)
           
 void setDisplayname(java.lang.String displayname)
           
 void setDownloadCounter(long l)
           
 void setInitialAuthor(java.lang.String initialAuthor)
           
 void setLastModified(java.util.Date date)
           
 void setLastUsage(java.util.Date lastUsage)
           
 void setLaunchCounter(long l)
           
 void setMetaDataElements(java.util.List<MetaDataElement> metaDataElements)
           
 void setOlatResource(OLATResource olatResource)
           
 void setOwnerGroup(SecurityGroup ownerGroup)
          Set the group of owners of this repo entry.
 void setResourcename(java.lang.String name)
           
 void setSoftkey(java.lang.String softkey)
          Set the softkey of this repository entry.
 void setStatusCode(int statusCode)
           
 void setVersion(int v)
           
 java.lang.String toString()
           
 
Methods inherited from class org.olat.core.commons.persistence.PersistentObject
equalsByPersistableKey, getCreationDate, getKey
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACC_OWNERS

public static final int ACC_OWNERS
limit access to owners

See Also:
Constant Field Values

ACC_OWNERS_AUTHORS

public static final int ACC_OWNERS_AUTHORS
limit access to owners and authors

See Also:
Constant Field Values

ACC_USERS

public static final int ACC_USERS
limit access to owners, authors and users

See Also:
Constant Field Values

ACC_USERS_GUESTS

public static final int ACC_USERS_GUESTS
no limits

See Also:
Constant Field Values
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class PersistentObject
See Also:
Object.toString()

getSoftkey

public java.lang.String getSoftkey()
Returns:
The softkey associated with this repository entry.

setSoftkey

public void setSoftkey(java.lang.String softkey)
Set the softkey of this repository entry.

Parameters:
softkey -

getDescription

public java.lang.String getDescription()
Returns:
Returns the description.

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - The description to set.

getFormattedDescription

public java.lang.String getFormattedDescription()
Returns:
description as HTML snippet

getInitialAuthor

public java.lang.String getInitialAuthor()
Returns:
Returns the initialAuthor.

setInitialAuthor

public void setInitialAuthor(java.lang.String initialAuthor)
Parameters:
initialAuthor - The initialAuthor to set.

getMetaDataElements

public java.util.List<MetaDataElement> getMetaDataElements()
Returns:
Returns the metaDataElements.

setMetaDataElements

public void setMetaDataElements(java.util.List<MetaDataElement> metaDataElements)
Parameters:
metaDataElements - The metaDataElements to set.

getStatusCode

public int getStatusCode()
Returns:
Returns the statusCode.

setStatusCode

public void setStatusCode(int statusCode)
Parameters:
statusCode - The statusCode to set.

getResourcename

public java.lang.String getResourcename()
Returns:
Returns the name.

setResourcename

public void setResourcename(java.lang.String name)
Parameters:
name - The name to set.

getOlatResource

public OLATResource getOlatResource()
Returns:
Returns the olatResource.

setOlatResource

public void setOlatResource(OLATResource olatResource)
Parameters:
olatResource - The olatResource to set.

getOwnerGroup

public SecurityGroup getOwnerGroup()
Returns:
Grou of owners of this repo entry.

setOwnerGroup

public void setOwnerGroup(SecurityGroup ownerGroup)
Set the group of owners of this repo entry.

Parameters:
ownerGroup -

getCanCopy

public boolean getCanCopy()
Returns:
Wether this repo entry can be copied.

getCanReference

public boolean getCanReference()
Returns:
Wether this repo entry can be referenced by other people.

getCanDownload

public boolean getCanDownload()
Returns:
Wether this repo entry can be downloaded.

getCanLaunch

public boolean getCanLaunch()
Returns:
Wether this repo entry can be launched.

getAccess

public int getAccess()
Returns:
Access restrictions.

setCanCopy

public void setCanCopy(boolean b)
Parameters:
b -

setCanReference

public void setCanReference(boolean b)
Parameters:
b -

setCanDownload

public void setCanDownload(boolean b)
Parameters:
b -

setCanLaunch

public void setCanLaunch(boolean b)
Parameters:
b -

setAccess

public void setAccess(int i)
Set access restrictions.

Parameters:
i -

getDownloadCounter

public long getDownloadCounter()
Returns:
Download count for this repo entry.

getLaunchCounter

public long getLaunchCounter()
Returns:
Launch count for this repo entry.

setDownloadCounter

public void setDownloadCounter(long l)
Parameters:
l -

setLaunchCounter

public void setLaunchCounter(long l)
Parameters:
l -

incrementLaunchCounter

public void incrementLaunchCounter()
Increment launch counter.


incrementDownloadCounter

public void incrementDownloadCounter()
Increment download counter.


getDisplayname

public java.lang.String getDisplayname()
Returns:
Returns the displayname.

setDisplayname

public void setDisplayname(java.lang.String displayname)
Parameters:
displayname - The displayname to set.

getResourceableTypeName

public java.lang.String getResourceableTypeName()
Specified by:
getResourceableTypeName in interface OLATResourceable
Returns:
a type name. It must be unique within OLAT. Consider this.getClass().getName() as such a type name.
See Also:
org.olat.core.id.OLATResourceablegetResourceableTypeName()

getResourceableId

public java.lang.Long getResourceableId()
Specified by:
getResourceableId in interface OLATResourceable
Returns:
a number identfiying the instance of this type. if null, then the OLATResourcable is just a type. The value 0 (zero) is not allowed
See Also:
org.olat.core.id.OLATResourceablegetResourceableId()

getLastUsage

public java.util.Date getLastUsage()
Returns:
Returns the lastUsage.

setLastUsage

public void setLastUsage(java.util.Date lastUsage)
Parameters:
lastUsage - The lastUsage to set.

getVersion

public int getVersion()

setVersion

public void setVersion(int v)

getLastModified

public java.util.Date getLastModified()
Specified by:
getLastModified in interface ModifiedInfo
Returns:
See Also:
ModifiedInfo.getLastModified()

setLastModified

public void setLastModified(java.util.Date date)
Specified by:
setLastModified in interface ModifiedInfo
See Also:
ModifiedInfo.setLastModified(java.util.Date)