Class Resource
java.lang.Object
ch.colabproject.colab.api.model.document.AbstractResource
ch.colabproject.colab.api.model.document.Resource
- All Implemented Interfaces:
ColabEntity,StickyNoteSourceable,WithDeletionStatus,WithPermission,WithTrackingData,WithWebsocketChannels,ch.colabproject.colab.generator.model.interfaces.WithId,ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator,Serializable
A resource is a document provided to help the users to fulfill their goals.
- Author:
- sandra
- See Also:
-
Field Summary
Fields inherited from class ch.colabproject.colab.api.model.document.AbstractResource
id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexpand()Resolve to concrete resource and return all transitive references too.get the id of the teaser.getTitle()inthashCode()booleanbooleanbooleanvoidmergeToDuplicate(ColabEntity other) Update this object according to values provided by other.voidmergeToUpdate(ColabEntity other) Update this object according to values provided by other.resolve()Resolve to concrete ResourcevoidsetDeprecated(boolean deprecated) voidsetDocuments(List<Document> documents) voidsetLexicalConversion(ConversionStatus lexicalConversion) voidsetPublished(boolean published) voidsetRequestingForGlory(boolean requestingForGlory) voidsetTeaser(TextDataBlock teaser) voidsetTeaserId(Long teaserId) set the id of the teaser.voidtoString()Methods inherited from class ch.colabproject.colab.api.model.document.AbstractResource
getAbstractCardType, getAbstractCardTypeId, getCard, getCardContent, getCardContentId, getCardId, getCategory, getChannelsBuilder, getDeletionStatus, getId, getOwner, getProject, getReadCondition, getStickyNoteLinksAsSrc, getTrackingData, getUpdateCondition, hasAbstractCardType, hasCard, hasCardContent, setAbstractCardType, setAbstractCardTypeId, setCard, setCardContent, setCardContentId, setCardId, setCategory, setDeletionStatus, setId, setOwner, setStickyNoteLinksAsSrc, setTrackingData, toPartialStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator
getJsonDiscriminatorMethods inherited from interface ch.colabproject.colab.api.model.WithPermission
getCreateCondition, getDeleteConditionMethods inherited from interface ch.colabproject.colab.api.model.WithTrackingData
clearErasureTrackingData, setErasureTrackingData, touchMethods inherited from interface ch.colabproject.colab.api.model.WithWebsocketChannels
getIndexEntryPayload
-
Constructor Details
-
Resource
public Resource()
-
-
Method Details
-
getTitle
- Returns:
- The title
-
setTitle
- Parameters:
title- The title
-
isPublished
public boolean isPublished()- Returns:
- if it is at the disposal of the inheritors
-
setPublished
public void setPublished(boolean published) - Parameters:
published- if it is at the disposal of the inheritors
-
isRequestingForGlory
public boolean isRequestingForGlory()- Returns:
- if it asks upper level(s) to integrate the resource
-
setRequestingForGlory
public void setRequestingForGlory(boolean requestingForGlory) - Parameters:
requestingForGlory- if it asks upper level(s) to integrate the resource
-
isDeprecated
public boolean isDeprecated()- Returns:
- if it should not be used anymore
-
setDeprecated
public void setDeprecated(boolean deprecated) - Parameters:
deprecated- if it should not be used anymore
-
getLexicalConversion
- Returns:
- the conversion status : conversion status of documents for lexical
-
setLexicalConversion
- Parameters:
lexicalConversion- the new conversion status : conversion status of documents for lexical
-
getDocuments
- Returns:
- the content of the resource
-
setDocuments
- Parameters:
documents- the content of the resource
-
resolve
Description copied from class:AbstractResourceResolve to concrete Resource- Specified by:
resolvein classAbstractResource- Returns:
- the effective resource
-
expand
Description copied from class:AbstractResourceResolve to concrete resource and return all transitive references too.- Specified by:
expandin classAbstractResource- Returns:
- concrete resource and transitive references
-
mergeToUpdate
Description copied from interface:ColabEntityUpdate this object according to values provided by other.This is used when an object is prepared to be updated in database.
- Specified by:
mergeToUpdatein interfaceColabEntity- Overrides:
mergeToUpdatein classAbstractResource- Parameters:
other- object to take new values from- Throws:
ColabMergeException- if merging is not possible
-
mergeToDuplicate
Description copied from interface:ColabEntityUpdate this object according to values provided by other.This is used when an object is prepared to be duplicated.
- Specified by:
mergeToDuplicatein interfaceColabEntity- Overrides:
mergeToDuplicatein classAbstractResource- Parameters:
other- object to take new values from- Throws:
ColabMergeException- if merging is not possible
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractResource
-
equals
- Overrides:
equalsin classAbstractResource
-
toString
-