mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
Add custom values to api backend meta data
This commit is contained in:
@ -22,6 +22,8 @@
|
||||
package com.kingsrook.qqq.backend.module.api.model.metadata;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.QBackendMetaData;
|
||||
import com.kingsrook.qqq.backend.core.model.metadata.code.QCodeReference;
|
||||
import com.kingsrook.qqq.backend.module.api.APIBackendModule;
|
||||
@ -43,6 +45,8 @@ public class APIBackendMetaData extends QBackendMetaData
|
||||
|
||||
private QCodeReference actionUtil;
|
||||
|
||||
private HashMap<String, Serializable> customValues = new HashMap<>();
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@ -318,4 +322,61 @@ public class APIBackendMetaData extends QBackendMetaData
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for customValues
|
||||
**
|
||||
*******************************************************************************/
|
||||
public HashMap<String, Serializable> getCustomValues()
|
||||
{
|
||||
return customValues;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Getter for a single customValue
|
||||
**
|
||||
*******************************************************************************/
|
||||
public Serializable getCustomValue(String key)
|
||||
{
|
||||
return customValues.get(key);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Setter for customValues
|
||||
**
|
||||
*******************************************************************************/
|
||||
public void setCustomValues(HashMap<String, Serializable> customValues)
|
||||
{
|
||||
this.customValues = customValues;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for customValues
|
||||
**
|
||||
*******************************************************************************/
|
||||
public APIBackendMetaData withCustomValues(HashMap<String, Serializable> customValues)
|
||||
{
|
||||
this.customValues = customValues;
|
||||
return (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** Fluent setter for a single customValue
|
||||
**
|
||||
*******************************************************************************/
|
||||
public APIBackendMetaData withCustomValue(String key, Serializable value)
|
||||
{
|
||||
this.customValues.put(key, value);
|
||||
return (this);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user