Class CopyParam
- java.lang.Object
-
- ch.colabproject.colab.api.model.project.CopyParam
-
- All Implemented Interfaces:
ColabEntity
,WithDeletionStatus
,WithPermission
,WithTrackingData
,WithWebsocketChannels
,WithId
,WithJsonDiscriminator
,Serializable
@Entity public class CopyParam extends Object implements ColabEntity, WithWebsocketChannels
Parameters to copy a project.- Author:
- sandra
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PARAM_SEQUENCE_NAME
parameters sequence name
-
Constructor Summary
Constructors Constructor Description CopyParam()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CopyParam
buildDefault(Project project)
boolean
equals(Object obj)
ChannelsBuilders.ChannelsBuilder
getChannelsBuilder()
Get the channels this entity shall be sent through.DeletionStatus
getDeletionStatus()
Get the deletion status :Long
getId()
Project
getProject()
Long
getProjectId()
get the project id.Conditions.Condition
getReadCondition()
Get the condition required to read this entityTracking
getTrackingData()
Get the tracking dataConditions.Condition
getUpdateCondition()
Get the condition required to update this entityint
hashCode()
boolean
isWithDeliverables()
boolean
isWithResources()
boolean
isWithRoles()
void
mergeToUpdate(ColabEntity other)
Update this object according to values provided by other.void
setDeletionStatus(DeletionStatus status)
Set the deletion status :void
setId(Long id)
void
setProject(Project project)
void
setProjectId(Long id)
set the project id.void
setTrackingData(Tracking trackingData)
Set the tracking datavoid
setWithDeliverables(boolean withDeliverables)
void
setWithResources(boolean withResources)
void
setWithRoles(boolean withRoles)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.colabproject.colab.api.model.ColabEntity
mergeToDuplicate
-
Methods inherited from interface ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator
getJsonDiscriminator
-
Methods inherited from interface ch.colabproject.colab.api.model.WithPermission
getCreateCondition, getDeleteCondition
-
Methods inherited from interface ch.colabproject.colab.api.model.WithTrackingData
initErasureTrackingData, resetErasureTrackingData, touch
-
Methods inherited from interface ch.colabproject.colab.api.model.WithWebsocketChannels
getIndexEntryPayload
-
-
-
-
Field Detail
-
PARAM_SEQUENCE_NAME
public static final String PARAM_SEQUENCE_NAME
parameters sequence name- See Also:
- Constant Field Values
-
-
Method Detail
-
buildDefault
public static CopyParam buildDefault(Project project)
- Parameters:
project
- the related project- Returns:
- Default instance for a copy param
-
setId
public void setId(Long id)
- Parameters:
id
- the copy parameter ID
-
getTrackingData
public Tracking getTrackingData()
Description copied from interface:WithTrackingData
Get the tracking data- Specified by:
getTrackingData
in interfaceWithTrackingData
- Returns:
- tracking data
-
setTrackingData
public void setTrackingData(Tracking trackingData)
Description copied from interface:WithTrackingData
Set the tracking data- Specified by:
setTrackingData
in interfaceWithTrackingData
- Parameters:
trackingData
- new tracking data
-
getDeletionStatus
public DeletionStatus getDeletionStatus()
Description copied from interface:WithDeletionStatus
Get the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
getDeletionStatus
in interfaceWithDeletionStatus
- Returns:
- null or a deletion status
-
setDeletionStatus
public void setDeletionStatus(DeletionStatus status)
Description copied from interface:WithDeletionStatus
Set the deletion status :Is it in a bin or ready to be definitely deleted.
Null means active.
- Specified by:
setDeletionStatus
in interfaceWithDeletionStatus
- Parameters:
status
- null or a deletion status
-
isWithRoles
public boolean isWithRoles()
- Returns:
- If the roles must also be copied
-
setWithRoles
public void setWithRoles(boolean withRoles)
- Parameters:
withRoles
- If the roles must also be copied
-
isWithDeliverables
public boolean isWithDeliverables()
- Returns:
- If the deliverables must also be copied
-
setWithDeliverables
public void setWithDeliverables(boolean withDeliverables)
- Parameters:
withDeliverables
- If the deliverables must also be copied
-
isWithResources
public boolean isWithResources()
- Returns:
- If the resources must also be copied
-
setWithResources
public void setWithResources(boolean withResources)
- Parameters:
withResources
- If the resources must also be copied
-
getProject
public Project getProject()
- Returns:
- the project it belongs to
-
setProject
public void setProject(Project project)
- Parameters:
project
- the project it belongs to
-
getProjectId
public Long getProjectId()
get the project id. To be sent to client- Returns:
- id of the project or null
-
setProjectId
public void setProjectId(Long id)
set the project id. For serialization only- Parameters:
id
- the id of the project
-
mergeToUpdate
public void mergeToUpdate(ColabEntity other) throws ColabMergeException
Description copied from interface:ColabEntity
Update this object according to values provided by other.This is used when an object is prepared to be updated in database.
- Specified by:
mergeToUpdate
in interfaceColabEntity
- Parameters:
other
- object to take new values from- Throws:
ColabMergeException
- if merging is not possible
-
getChannelsBuilder
public ChannelsBuilders.ChannelsBuilder getChannelsBuilder()
Description copied from interface:WithWebsocketChannels
Get the channels this entity shall be sent through.- Specified by:
getChannelsBuilder
in interfaceWithWebsocketChannels
- Returns:
- list of channels
-
getReadCondition
public Conditions.Condition getReadCondition()
Description copied from interface:WithPermission
Get the condition required to read this entity- Specified by:
getReadCondition
in interfaceWithPermission
- Returns:
- the condition
-
getUpdateCondition
public Conditions.Condition getUpdateCondition()
Description copied from interface:WithPermission
Get the condition required to update this entity- Specified by:
getUpdateCondition
in interfaceWithPermission
- Returns:
- the condition
-
-