public PEPService getPEPService( PubSubService.UniqueIdentifier uniqueIdentifier, boolean autoCreate )
    {
        // PEP Services use the JID as their service identifier.
        final JID needle;
        try {
            needle = new JID(uniqueIdentifier.getServiceId());
        } catch (IllegalArgumentException ex) {
            Log.warn( "Unable to get PEP service. Provided unique identifier does not contain a valid JID: " + uniqueIdentifier, ex );
            return null;
        }
        return getPEPService( needle, autoCreate );
    }
Retrieves a PEP service -- attempting first from memory, then from the
database.

This method can automatically create a PEP service if one does not exist.

@param uniqueIdentifier
           the unique identifier of the PEP service.
@param autoCreate
           true if a PEP service that does not yet exist needs to be created.
@return the requested PEP service if found or null if not found.
xmppserver/src/main/java/org/jivesoftware/openfire/pep/PEPServiceManager.java