AbstractScriptedService.java revision bf3adaa7953ef4d249670fa82f2a0f7f17ee4b7b
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2013 ForgeRock AS. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*/
/**
* A NAME does ...
*
* @author Laszlo Hordos
*/
@Component(componentAbstract = true)
/**
* Setup logging for the {@link AbstractScriptedService}.
*/
/** Script Registry service. */
private ScriptRegistry scriptRegistry;
}
}
/**
* Operation mask for supported operation.
*/
protected final int mask;
protected AbstractScriptedService() {
}
protected AbstractScriptedService(int mask) {
}
throws ResourceException;
protected abstract BundleContext getBundleContext();
protected ScriptCustomizer getScriptCustomizer() {
return this;
}
return properties;
}
this.properties = properties;
}
final JsonValue configuration) {
}
try {
scriptEntry.addScriptListener(this);
} catch (ScriptException e) {
}
}
protected void deactivate() {
try {
if (null != selfRegistration) {
}
} catch (IllegalStateException e) {
/* Catch if the service was already removed */
} finally {
if (null != scriptName) {
}
}
}
// ----- Implementation of ScriptListener interface
if (null == selfRegistration) {
synchronized (selfRegistration) {
if (null == selfRegistration) {
RequestHandler.class,
getScriptCustomizer()), getProperties());
}
}
}
if (null != selfRegistration) {
synchronized (selfRegistration) {
if (null != selfRegistration) {
}
}
}
/*
* if (null != selfRegistration) { selfRegistration.unregister(); }
* if (null == selfRegistration) { selfRegistration =
* getBundleContext().registerService(RequestHandler.class, new
* ScriptedRequestHandler( event.getScriptLibraryEntry(), this),
* properties); }
*/
}
}
// ----- Implementation of ScriptCustomizer interface
throw new NotSupportedException("Actions are not supported for resource instances");
}
}
throw new NotSupportedException("Create operations are not supported");
}
}
throw new NotSupportedException("Delete operations are not supported");
}
}
throw new NotSupportedException("Patch operations are not supported");
}
}
throw new NotSupportedException("Query operations are not supported");
}
}
throw new NotSupportedException("Read operations are not supported");
}
}
throw new NotSupportedException("Update operations are not supported");
}
}
final JsonValue serverContext;
try {
if (null != serverContext) {
}
} catch (ResourceException e) {
/* ignore */
}
return Collections.emptyMap();
}
}));
}
}