All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.netbeans.spi.xml.services.package.html Maven / Gradle / Ivy

The newest version!



XML Tools SPI


NetBeans XML tools services implementation guidelines.

XML Tools Services SPIs

Services and Settings

A service should not fully control its settings. The setting should be separated (possibly standartized) and located by the service using run-time invocation context. Context sensitive services must express their contextuality in API allowing clients to pass the invocation context to them.

Global Service API Example

public interface XMLService extends EntityResolver {
  // inherited from EntityResolver
  // InputSource resolveEntity(String publicId, String systemId);
}

Context Sensitive Service API Example

public interface CtxXMLService {
  InputSource resolveEntity(Lookup ctx, String publicId, String systemId);
}
Also factoring approach can be used:
public interface CtxService {
  XMLServiceWith30Methods getXMLService(Lookup ctx);
}

Statefull Contextual Services

Some contextual services are statefull. In such case implementor must properly handle state per individual context. For example such service can store its state in context if apply.

Global Context

How should we handle null contexts? Treat them as global (for settings).




© 2015 - 2024 Weber Informatics LLC | Privacy Policy