Class DataItemModification

java.lang.Object
de.rpgframework.genericrpg.modification.Modification
de.rpgframework.genericrpg.modification.DataItemModification
All Implemented Interfaces:
Datable, Cloneable
Direct Known Subclasses:
AllowModification, ApplyableValueModification, EmbedModification, RecommendationModification, ValueModification

@Root(name="itemmod") public class DataItemModification extends Modification implements Cloneable, Datable
A modification made to the current item it is attached to
  • Field Details

    • ref

      @Attribute(name="ref", required=true) protected String ref
    • variant

      @Attribute protected String variant
    • choice

      @Attribute(name="choice", required=false) protected UUID choice
    • remove

      @Attribute protected boolean remove
    • choiceOptions

      @Attribute(name="options") protected String choiceOptions
      For modifications with a choice, this can limit the options
    • restrictedToMode

      @Attribute(name="mode", required=false) protected String restrictedToMode
      Identifier of mode when the modification applies. Prepend a '!' to express a mode that may NOT be active
    • decisions

      @ElementList(type=Decision.class, entry="decision", inline=true) protected List<Decision> decisions
    • expCost

      @Attribute protected int expCost
    • date

      @Attribute protected Date date
    • id

      @Attribute protected UUID id
      May be used to identify automatically added elements - e.g. like a lifestyle added to a character - and therefore prevent duplicate additions
  • Constructor Details

    • DataItemModification

      public DataItemModification()
    • DataItemModification

      public DataItemModification(ModifiedObjectType type, String ref)
  • Method Details

    • clone

      public DataItemModification clone()
      Overrides:
      clone in class Modification
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Modification
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • getKey

      public String getKey()
    • setKey

      public void setKey(String key)
    • getResolvedKey

      public <T> T getResolvedKey()
    • getAsKeys

      public String[] getAsKeys()
    • getConnectedChoice

      public UUID getConnectedChoice()
    • validate

      public void validate() throws ReferenceException
      Description copied from class: Modification
      Validate content in this modification during load
      Overrides:
      validate in class Modification
      Throws:
      ReferenceException
      See Also:
    • getDecisions

      public List<Decision> getDecisions()
    • getDecision

      public Decision getDecision(UUID uuid)
    • setDecisions

      public void setDecisions(List<Decision> decisions)
    • getChoiceOptions

      public String getChoiceOptions()
      Returns:
      the choiceOptions
    • getExpCost

      public int getExpCost()
      Returns:
      the expCost
    • setExpCost

      public void setExpCost(int expCost)
      Parameters:
      expCost - the expCost to set
    • getDate

      public Date getDate()
      Description copied from interface: Datable
      Return the date of the change
      Specified by:
      getDate in interface Datable
      Returns:
      the date
    • setDate

      public void setDate(Date date)
      Description copied from interface: Datable
      Set the date of the change
      Specified by:
      setDate in interface Datable
      Parameters:
      date - the date to set
    • isRemove

      public boolean isRemove()
      Returns:
      the remove
    • setRemove

      public void setRemove(boolean remove)
      Parameters:
      remove - the remove to set
    • getVariant

      public String getVariant()
      Returns:
      the variant
    • getId

      public UUID getId()
      Returns:
      the id
    • setId

      public void setId(UUID id)