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 final int
     

    Fields inherited from class org.wso2.carbon.core.AbstractAdmin

    axisConfig, configurationContext
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Add a entry into the synapseConfiguration
    boolean
    addEntryForTenant(String element, String tenantDomain)
    Add an entry into the Synapse Configuration.
    boolean
    deleteEntry(String entryKey)
    Deletes the entry with the given name from SynapseConfiguration
    boolean
    deleteEntryForTenant(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.OMElement
    getEntry(String entryKey)
    Returns the OMelement representation of the entry given by sequence name
    int
     
    org.apache.axiom.om.OMElement
    getEntryForTenant(String entryKey, String tenantDomain)
    Returns the OMElement representation of the entry given by sequence name.
    Returns an String array of the entry names present in the synapse configuration
     
    boolean
    isEntryExist(String entryKey)
    Check entry exist in the synapseConfiguration
    boolean
    isEntryExistForTenant(String entryKey, String tenantDomain)
    Check local entry exist in the synapseConfiguration
    paginatedEntryData(int pageNumber)
     
    boolean
    Saves the entry described with the OMElement representing the entry
    boolean
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOCAL_ENTRIES_PER_PAGE

      public static final int LOCAL_ENTRIES_PER_PAGE
      See Also:
  • Constructor Details

    • LocalEntryAdmin

      public LocalEntryAdmin()
  • Method Details

    • 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 an
      tenantDomain - 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 OMElement
      tenantDomain - 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 entry
      tenantDomain - 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 get
      tenantDomain - 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 delete
      tenantDomain - 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)