This class is a plugin which provides the admin service for the application's owner. Its superclass, AbstractPlugin, provides the basic methods to make this a plugin. The methods here provide its specific functionality. This will be plugged into a ServiceManager which provides default admin service tools; this classes does not provide anything additional, but does confirm that those tools should be provided.
package org.jtrix.project.skeleton2.plugins;
import org.jtrix.base.*;
import org.jtrix.facets1.util.properties.*;
import org.jtrix.project.libjtrix.netlet.FacetCollection;
import org.jtrix.project.beatrix.plugins.*;
import org.jtrix.project.beatrix.plugins.util.*;
/**
* Skeleton's admin service, which provides just the standard Beatrix
* admin facets.
*
* @author ulf@jtrix.org
* @author nadia@jtrix.org
* @version $Revision: 1.13 $
*/
public class AdminServiceProvider
extends AbstractPlugin implements ISimpleServiceProvider, IPlugin
{
/**
* Create a facet collection for this service label, called once
* for each service bind request.
* @param session Service session from client
* @param service_type Service name requested by client
* @param args Property argument pulled from client's warrant
*/
public IFacetCollection createFacetCollection(String service_type, Property args)
{
return new FacetCollection();
}
/** @return True if this service provider is an admin service.
*/
public boolean isAdminProvider()
{
return true;
}
}
We don't need to do much--we only want some standard admin facets. Since we have flagged it as an admin service we will get admin facets added to the (empty) facet collection we return.
See Section
for more on services.
Nik Silver 2002-03-09