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
FieldsFields inherited from class org.wso2.carbon.core.AbstractAdmin
axisConfig, configurationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a entry into the synapseConfigurationbooleanaddEntryForTenant(String element, String tenantDomain) Add an entry into the Synapse Configuration.booleandeleteEntry(String entryKey) Deletes the entry with the given name from SynapseConfigurationbooleandeleteEntryForTenant(String entryKey, String tenantDomain) Deletes the entry with the given name from Synapse Configuration.org.wso2.carbon.mediation.dependency.mgt.ConfigurationObject[]getDependents(String entryName) org.apache.axiom.om.OMElementReturns the OMelement representation of the entry given by sequence nameintorg.apache.axiom.om.OMElementgetEntryForTenant(String entryKey, String tenantDomain) Returns the OMElement representation of the entry given by sequence name.String[]Returns an String array of the entry names present in the synapse configurationbooleanisEntryExist(String entryKey) Check entry exist in the synapseConfigurationbooleanisEntryExistForTenant(String entryKey, String tenantDomain) Check local entry exist in the synapseConfigurationpaginatedEntryData(int pageNumber) booleanSaves the entry described with the OMElement representing the entrybooleansaveEntryForTenant(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, unlockSynapseConfigurationMethods 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 Details
-
LOCAL_ENTRIES_PER_PAGE
public static final int LOCAL_ENTRIES_PER_PAGE- See Also:
-
-
Constructor Details
-
LocalEntryAdmin
public LocalEntryAdmin()
-
-
Method Details
-
entryData
- Throws:
LocalEntryAdminException
-
paginatedEntryData
- Throws:
LocalEntryAdminException
-
getEntryDataCount
- Throws:
LocalEntryAdminException
-
isEntryExist
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
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
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
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
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
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
- Throws:
LocalEntryAdminException
-
getDependents
public org.wso2.carbon.mediation.dependency.mgt.ConfigurationObject[] getDependents(String entryName)
-