Пример #1
0
  /**
   * Obtains the properties for the passed in object. This is a JBoss managed operation.
   *
   * @param objectName
   * @param objectType
   * @return an collection of managed properties (may be <code>null</code>)
   */
  @ManagementOperation(
      description = "Obtains the properties for an object",
      impact = Impact.ReadOnly)
  public List<ManagedProperty> getProperties(String objectName, Component objectType) {
    if (!isRunning()) return Collections.emptyList();

    // Get engine to use for the rest of the method (this is synchronized)
    // ...
    final JcrEngine engine = getEngine();
    assert engine != null;

    List<ManagedProperty> managedProps = new ArrayList<ManagedProperty>();
    if (objectType.equals(Component.CONNECTOR)) {
      RepositorySource repositorySource = engine.getRepositorySource(objectName);
      assert repositorySource != null : "Connection '" + objectName + "' does not exist";
      managedProps = ManagedUtils.getProperties(objectType, repositorySource);
    } else if (objectType.equals(Component.CONNECTIONPOOL)) {
      RepositoryConnectionPool connectionPool =
          engine.getRepositoryService().getRepositoryLibrary().getConnectionPool(objectName);
      assert connectionPool != null
          : "Repository Connection Pool for repository '" + objectName + "' does not exist";
      managedProps = ManagedUtils.getProperties(objectType, connectionPool);
    }

    return managedProps;
  }
    @Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (!(o instanceof PrioritizedMethod)) return false;

      PrioritizedMethod that = (PrioritizedMethod) o;

      if (priority != that.priority) return false;
      if (component != null ? !component.equals(that.component) : that.component != null)
        return false;
      if (method != null ? !method.equals(that.method) : that.method != null) return false;

      return true;
    }
Пример #3
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;
    if (getClass() != obj.getClass()) return false;

    ComponentEvent other = (ComponentEvent) obj;
    if (m_component == null) {
      if (other.m_component != null) return false;
    } else if (!m_component.equals(other.m_component)) return false;

    //		if (m_event == null) {
    //			if (other.m_event != null)
    //				return false;
    //		} else if (!m_event.equals(other.m_event))
    //			return false;

    return true;
  }
 /** Method to get the previous component for focus */
 public Component getComponentBefore(Container focusCycleRoot, Component aComponent) {
   if (aComponent.equals(colValue)) return rowValue;
   else return colValue;
 }