Class LocalEntryAdmin
- java.lang.Object
-
- org.wso2.carbon.core.AbstractAdmin
-
- org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
-
- org.wso2.carbon.localentry.service.LocalEntryAdmin
-
public class LocalEntryAdmin extends org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
This is a POJO for Entry based administration service
-
-
Field Summary
Fields Modifier and Type Field Description static int
LOCAL_ENTRIES_PER_PAGE
-
Constructor Summary
Constructors Constructor Description LocalEntryAdmin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addEntry(String ele)
Add a entry into the synapseConfigurationboolean
addEntryForTenant(String element, String tenantDomain)
Add an entry into the Synapse Configuration.boolean
deleteEntry(String entryKey)
Deletes the entry with the given name from SynapseConfigurationboolean
deleteEntryForTenant(String entryKey, String tenantDomain)
Deletes the entry with the given name from Synapse Configuration.EntryData[]
entryData()
org.wso2.carbon.mediation.dependency.mgt.ConfigurationObject[]
getDependents(String entryName)
org.apache.axiom.om.OMElement
getEntry(String entryKey)
Returns the OMelement representation of the entry given by sequence nameint
getEntryDataCount()
org.apache.axiom.om.OMElement
getEntryForTenant(String entryKey, String tenantDomain)
Returns the OMElement representation of the entry given by sequence name.String[]
getEntryNames()
Returns an String array of the entry names present in the synapse configurationString
getEntryNamesString()
boolean
isEntryExist(String entryKey)
Check entry exist in the synapseConfigurationboolean
isEntryExistForTenant(String entryKey, String tenantDomain)
Check local entry exist in the synapseConfigurationEntryData[]
paginatedEntryData(int pageNumber)
boolean
saveEntry(String ele)
Saves the entry described with the OMElement representing the entryboolean
saveEntryForTenant(String element, String tenantDomain)
Saves the entry described with the OMElement.-
Methods inherited from class org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
getLock, getMediationPersistenceManager, getServerConfigurationInformation, getServerContextInformation, getSynapseConfiguration, getSynapseEnvironment, getSynapseEnvironment, lockSynapseConfiguration, unlockSynapseConfiguration
-
Methods inherited from class org.wso2.carbon.core.AbstractAdmin
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUserId, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
-
-
-
-
Field Detail
-
LOCAL_ENTRIES_PER_PAGE
public static final int LOCAL_ENTRIES_PER_PAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
entryData
public EntryData[] entryData() throws LocalEntryAdminException
- Throws:
LocalEntryAdminException
-
paginatedEntryData
public EntryData[] paginatedEntryData(int pageNumber) throws LocalEntryAdminException
- Throws:
LocalEntryAdminException
-
getEntryDataCount
public int getEntryDataCount() throws LocalEntryAdminException
- Throws:
LocalEntryAdminException
-
isEntryExist
public boolean isEntryExist(String entryKey) throws LocalEntryAdminException
Check entry exist in the synapseConfiguration- Parameters:
entryKey
- - Entry object to be added as an OMElement- Returns:
- whether the local entry is exist
- Throws:
LocalEntryAdminException
- if there any error in check existence.
-
isEntryExistForTenant
public boolean isEntryExistForTenant(String entryKey, String tenantDomain) throws LocalEntryAdminException
Check local entry exist in the synapseConfiguration- Parameters:
entryKey
- - Entry object to be added as antenantDomain
- tenantDomain- Returns:
- whether the local entry is exist
- Throws:
LocalEntryAdminException
- if there any error in check existence.
-
addEntry
public boolean addEntry(String ele) throws LocalEntryAdminException
Add a entry into the synapseConfiguration- Parameters:
ele
- - Entry object to be added as an OMElement- Returns:
- whether the operation is successfull or not
- Throws:
LocalEntryAdminException
- if a Entry exists with the same name or if the element provided is not a Entry element
-
addEntryForTenant
public boolean addEntryForTenant(String element, String tenantDomain) throws LocalEntryAdminException
Add an entry into the Synapse Configuration.- Parameters:
element
- Entry object to be added as an OMElementtenantDomain
- Tenant domain- Returns:
- whether the operation is successful or not
- Throws:
LocalEntryAdminException
- if an entry exists with the same name or if the element provided is not an entry element
-
saveEntry
public boolean saveEntry(String ele) throws LocalEntryAdminException
Saves the entry described with the OMElement representing the entry- Parameters:
ele
- - OMElement representing the entry- Returns:
- whether the operation is successfull or not
- Throws:
LocalEntryAdminException
- if the entry name already exists or if the Element doesnt represent a entry element
-
saveEntryForTenant
public boolean saveEntryForTenant(String element, String tenantDomain) throws LocalEntryAdminException
Saves the entry described with the OMElement.- Parameters:
element
- OMElement representing the entrytenantDomain
- Tenant domain- Returns:
- whether the operation is successful or not
- Throws:
LocalEntryAdminException
- if the entry name already exists or if the element does not represent a entry element
-
getEntry
public org.apache.axiom.om.OMElement getEntry(String entryKey) throws LocalEntryAdminException
Returns the OMelement representation of the entry given by sequence name- Parameters:
entryKey
- - name of the entry to get- Returns:
- OMElement representing the entryMediator of the given entry name
- Throws:
LocalEntryAdminException
- if any error occured while getting the data from the SynapseConfiguration
-
getEntryForTenant
public org.apache.axiom.om.OMElement getEntryForTenant(String entryKey, String tenantDomain) throws LocalEntryAdminException
Returns the OMElement representation of the entry given by sequence name.- Parameters:
entryKey
- Name of the entry to gettenantDomain
- Tenant domain- Returns:
- OMElement representing the entryMediator of the given entry name
- Throws:
LocalEntryAdminException
- if any error occurred while getting the data from the Synapse Configuration
-
deleteEntry
public boolean deleteEntry(String entryKey) throws LocalEntryAdminException
Deletes the entry with the given name from SynapseConfiguration- Parameters:
entryKey
- - Name of the entry to delete- Returns:
- whether the operation is successfull or not
- Throws:
LocalEntryAdminException
- if the entry described by the given name doesnt exists in the Synapse Configuration
-
deleteEntryForTenant
public boolean deleteEntryForTenant(String entryKey, String tenantDomain) throws LocalEntryAdminException
Deletes the entry with the given name from Synapse Configuration.- Parameters:
entryKey
- Name of the entry to deletetenantDomain
- Tenant domain- Returns:
- whether the operation is successful or not
- Throws:
LocalEntryAdminException
- if the entry described by the given name does not exist in the Synapse Configuration
-
getEntryNames
public String[] getEntryNames() throws LocalEntryAdminException
Returns an String array of the entry names present in the synapse configuration- Returns:
- String array of entry names
- Throws:
LocalEntryAdminException
- if an error occurs in getting the synapse configuration
-
getEntryNamesString
public String getEntryNamesString() throws LocalEntryAdminException
- Throws:
LocalEntryAdminException
-
getDependents
public org.wso2.carbon.mediation.dependency.mgt.ConfigurationObject[] getDependents(String entryName)
-
-