Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/javadoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,13 @@
<packages>org.overlord.rtgov.call.trace:org.overlord.rtgov.call.trace.descriptors:org.overlord.rtgov.call.trace.model:org.overlord.rtgov.call.trace.util:org.overlord.rtgov.reports:org.overlord.rtgov.reports.model:org.overlord.rtgov.reports.util:org.overlord.rtgov.service.dependency:org.overlord.rtgov.service.dependency.layout:org.overlord.rtgov.service.dependency.presentation:org.overlord.rtgov.service.dependency.svg:org.overlord.rtgov.situation.manager</packages>
</group>
<group>
<title>Integration Support</title>
<title>Runtime Integration</title>
<packages>org.overlord.rtgov.client*</packages>
</group>
<group>
<title>UI Integration</title>
<packages>org.overlord.rtgov.ui.*</packages>
</group>
</groups>
</configuration>
</plugin>
Expand All @@ -133,6 +137,14 @@
<include name="**/src/main/java/**/*.java" />
<exclude name="**/internal/**" />
</fileset>
<fileset dir="../../integration/client">
<include name="**/src/main/java/**/*.java" />
<exclude name="**/internal/**" />
</fileset>
<fileset dir="../../ui/rtgov-ui-core">
<include name="**/src/main/java/**/*.java" />
<exclude name="**/internal/**" />
</fileset>
</copy>
</target>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* This interface represents the capability for recording
* activity information from a JEE application.
* activity information from an application.
*
*/
public interface ActivityReporter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* This interface represents the capability for validating
* activity information from a JEE application.
* activity information from an application.
*
*/
public interface ActivityValidator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* This interface represents the capability for recording
* activity information from a JEE application.
* activity information from an application.
*
*/
public class DefaultActivityReporter implements ActivityReporter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

/**
* This interface represents the capability for validating
* activity information from a JEE application.
* activity information from an application.
*
*/
public class DefaultActivityValidator implements ActivityValidator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Alternative;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;

import org.overlord.commons.services.ServiceRegistryUtil;
import org.overlord.rtgov.ui.client.model.Constants;
import org.overlord.rtgov.ui.client.model.QName;
import org.overlord.rtgov.ui.client.model.ReferenceBean;
Expand All @@ -46,9 +45,15 @@ public class ServicesProviderServiceImpl implements IServicesServiceImpl {

private static final int SERVICES_PER_PAGE=10;

@Inject
private Instance<ServicesProvider> _providers;
private java.util.Set<ServicesProvider> _providers;

/**
* The default constructor.
*/
public ServicesProviderServiceImpl() {
_providers = ServiceRegistryUtil.getServices(ServicesProvider.class);
}

/**
* @see org.overlord.rtgov.ui.server.services.IServicesServiceImpl#getApplicationNames()
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* Copyright 2013-4 Red Hat Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.overlord.rtgov.ui.provider;

import java.util.List;

import org.overlord.rtgov.ui.client.model.QName;
import org.overlord.rtgov.ui.client.model.ReferenceBean;
import org.overlord.rtgov.ui.client.model.UiException;

/**
* This class provides an abstract base implementation of the ServicesProvider
* interface.
*
*/
public abstract class AbstractServicesProvider implements ServicesProvider {

private java.util.Map<Class<? extends ActionProvider>, ActionProvider> _actionProviders=
new java.util.HashMap<Class<? extends ActionProvider>,ActionProvider>();

/**
* This method registers an action.
*
* @param type The action type
* @param action The action
*/
protected void registerAction(Class<? extends ActionProvider> type, ActionProvider action) {
_actionProviders.put(type, action);
}

/**
* This method unregisters an action.
*
* @param type The action type
* @return The action
*/
protected ActionProvider unregisterAction(Class<? extends ActionProvider> type) {
return (_actionProviders.remove(type));
}

/**
* {@inheritDoc}
*/
public List<QName> getApplicationNames() throws UiException {
return (java.util.Collections.<QName>emptyList());
}

/**
* {@inheritDoc}
*/
public ReferenceBean getReference(String uuid) throws UiException {
return (null);
}

/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
public <T extends ActionProvider> T getAction(Class<T> actionType) {
return ((T)_actionProviders.get(actionType));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2008-13, Red Hat Middleware LLC, and others contributors as indicated
* by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.overlord.rtgov.ui.provider;

/**
* This class represents an action that can be performed.
*
*/
public abstract class ActionProvider {

/**
* This method returns the name of the action.
*
* @return The action name
*/
public abstract String getName();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2008-13, Red Hat Middleware LLC, and others contributors as indicated
* by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.overlord.rtgov.ui.provider;

import org.overlord.rtgov.ui.client.model.MessageBean;
import org.overlord.rtgov.ui.client.model.UiException;

/**
* This interface represents the action provider for the Resubmit task.
*
*/
public abstract class ResubmitActionProvider extends ActionProvider {

private static final String RESUBMIT = "Resubmit";

/**
* {@inheritDoc}
*/
public String getName() {
return RESUBMIT;
}

/**
* This method determines whether this provider support's a resubmit of the
* supplied service operation.
*
* @param service The service
* @param operation The operation
* @return Whether this provider support's a resubmit for the given service
* and operation
* @throws UiException Failed to test if service operation can be resubmitted
*/
public abstract boolean isResubmitSupported(String service, String operation) throws UiException;

/**
* This method resubmits the supplied message to the target service
* and operation.
*
* @param service The service
* @param operation The operation
* @param message The message
* @throws UiException Failed to resubmit the message
*/
public abstract void resubmit(String service, String operation, MessageBean message) throws UiException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import java.util.List;

import org.overlord.rtgov.ui.client.model.MessageBean;
import org.overlord.rtgov.ui.client.model.QName;
import org.overlord.rtgov.ui.client.model.ReferenceBean;
import org.overlord.rtgov.ui.client.model.ServiceBean;
Expand Down Expand Up @@ -48,29 +47,6 @@ public interface ServicesProvider {
*/
public boolean isServiceKnown(String service);

/**
* This method determines whether this provider support's a resubmit of the
* supplied service operation.
*
* @param service The service
* @param operation The operation
* @return Whether this provider support's a resubmit for the given service
* and operation
* @throws UiException Failed to test if service operation can be resubmitted
*/
public boolean isResubmitSupported(String service, String operation) throws UiException;

/**
* This method resubmits the supplied message to the target service
* and operation.
*
* @param service The service
* @param operation The operation
* @param message The message
* @throws UiException Failed to resubmit the message
*/
public void resubmit(String service, String operation, MessageBean message) throws UiException;

/**
* This method returns the list of application names.
*
Expand Down Expand Up @@ -106,4 +82,13 @@ public interface ServicesProvider {
*/
public ReferenceBean getReference(String uuid) throws UiException;

/**
* This method retrieves the action provider for the supplied
* type. If no action provider exists, then a null will be returned.
*
* @param actionType The action type
* @return The action provider, or null if not supported
*/
public <T extends ActionProvider> T getAction(Class<T> actionType);

}
Loading