Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

JipInventory

...

Panel
panelIconIdatlassian-info
panelIcon:info:
panelIconText:info:
bgColor#F4F5F7

This page is about Assets & Inventory Plugin for Jira DC. Using Cloud? Click here.

This document describes the data model entities used to represent assets and their associated attributes within AIP.

On this page:

Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printabletrue

Core entities

JipInventory

The main class of asset object. Related classes are listed on this page. The asset object is injected into the Groovy script.

Code Block
package inventoryplugin.entity;

import net.java.ao.Entity;
import net.java.ao.Implementation;
import net.java.ao.OneToMany;
import net.java.ao.Preload;
import net.java.ao.schema.Indexed;
import net.java.ao.schema.StringLength;

import java.util.Date;

@Preload
@Implementation(JipInventoryImpl.class)
public interface JipInventory extends Entity {
   @Indexed
   JipForm getForm();
   @Indexed
   void setForm(JipForm form);
   
   int getSortOrder();
   void setSortOrder(int value);
   
   @Indexed
   String getName();
   @Indexed
   void setName(String name);
   
   @Indexed
   String getCustomfieldId();
   @Indexed
   void setCustomfieldId(String customfieldId);
   
   @Indexed
   Long getOptionId();
   @Indexed
   void setOptionId(Long optionId);

   @Indexed
   Date getCreated();
   @Indexed
   void setCreated(Date created);

   String getCreator();
   void setCreator(String creator);

   @StringLength(StringLength.UNLIMITED)
   String getAttachments();
   @StringLength(StringLength.UNLIMITED)
   void setAttachments(String value);

   @OneToMany
   public JipInventoryItem[] getInventoryItems();
}

...

JipInventoryItem

Attribute values of an asset.

Code Block
package inventoryplugin.entity;

import net.java.ao.Entity;
import net.java.ao.Preload;
import net.java.ao.schema.StringLength;

@Preload
public interface JipInventoryItem extends Entity {
   JipFormAttribute getFormAttribute();
   void setFormAttribute(JipFormAttribute formAttribute);

   @StringLength(StringLength.UNLIMITED)
   String getValue();
   @StringLength(StringLength.UNLIMITED)
   void setValue(String value);

   void setInventory(JipInventory inventory);
   JipInventory getInventory();
}

JipAttribute

Attribute definition class.

Attribute Type Names: DropdownList, ListBox, ListBoxMultiple, Text, TextArea, RadioButtonList, CheckboxList, DatePicker, DatetimePicker, UserPicker, InventoryList, InventoryListByForm, IP, IPv6, URL.

Code Block
package inventoryplugin.entity;

import net.java.ao.Entity;
import net.java.ao.Implementation;
import net.java.ao.OneToMany;
import net.java.ao.Preload;
import net.java.ao.schema.Indexed;

@Preload
@Implementation(JipAttributeImpl.class)
public interface JipAttribute extends Entity {
   @Indexed
   String getAttributeName();
   @Indexed
   void setAttributeName(String name);
   
   String getAttributeType();
   void setAttributeType(String value);
   
   String getPattern();
   void setPattern(String pattern);
   
   @OneToMany//(reverse = "getAttribute") comes with 0.22.1 version
   public JipAttributeValue[] getAttributeValues(); 
}

 

JipFormAttribute

Attributes of a form.

Code Block
package inventoryplugin.entity;

import net.java.ao.Entity;
import net.java.ao.Preload;

@Preload
public interface JipFormAttribute extends Entity {
   public JipForm getForm();
   public void setForm(JipForm form);
   
   public JipAttribute getAttribute();
   public void setAttribute(JipAttribute attribute);
   
   public int getSortOrder();
   public void setSortOrder(int sortOrder);

   boolean isRequired();
   void setRequired(boolean required);
}

JipAttributeValue

Values (Optionsoptions) of an attribute.

Code Block
package inventoryplugin.entity;

import net.java.ao.Entity;
import net.java.ao.Preload;
import net.java.ao.schema.Indexed;

@Preload
public interface JipAttributeValue extends Entity {
   @Indexed
   public JipAttribute getAttribute();
   @Indexed
   public void setJipAttribute(JipAttribute attribute);
   
   public String getValue();
   public void setValue(String value);
   
   public int getSortOrder();
   public void setSortOrder(int sortOrder);
}

...

 

JipForm

Main form class.

Code Block
package inventoryplugin.entity;

import net.java.ao.Entity;
import net.java.ao.Implementation;
import net.java.ao.OneToMany;
import net.java.ao.Preload;
import net.java.ao.schema.Indexed;

@Preload
@Implementation(JipFormImpl.class)
public interface JipForm extends Entity {
   @Indexed
   String getFormName();
   @Indexed
   void setFormName(String name);
   
   int getSortOrder();
   void setSortOrder(int value);
   
   @OneToMany
   public JipFormAttribute[] getFormAttributes(); 
   
   @OneToMany
   public JipInventory[] getInventories();
}