import java.util.Map;
import javax.jcr.Credentials;
+import javax.jcr.LoginException;
+import javax.jcr.NoSuchWorkspaceException;
import javax.jcr.Node;
import javax.jcr.NodeIterator;
-import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.nodetype.NodeType;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.jackrabbit.api.JackrabbitRepository;
import org.apache.jackrabbit.commons.NamespaceHelper;
import org.apache.jackrabbit.commons.cnd.CndImporter;
import org.argeo.ArgeoException;
* Wrapper around a Jackrabbit repository which allows to simplify configuration
* and intercept some actions. It exposes itself as a {@link Repository}.
*/
+@SuppressWarnings("deprecation")
public class JackrabbitWrapper extends JcrRepositoryWrapper implements
- ResourceLoaderAware {
+ JackrabbitRepository, ResourceLoaderAware {
private final static Log log = LogFactory.getLog(JackrabbitWrapper.class);
private final static String DIGEST_ALGORITHM = "MD5";
String oldDigest = JcrUtils.checksumFile(dataModel,
DIGEST_ALGORITHM);
if (oldDigest.equals(newDigest)) {
- if (log.isDebugEnabled())
- log.debug("Data model " + resUrl
+ if (log.isTraceEnabled())
+ log.trace("Data model " + resUrl
+ " hasn't changed, keeping version "
+ currentVersion);
return;
}
/*
- * REPOSITORY INTERCEPTOR
+ * JACKRABBIT REPOSITORY IMPLEMENTATION
*/
+ @Override
+ public Session login(Credentials credentials, String workspaceName,
+ Map<String, Object> attributes) throws LoginException,
+ NoSuchWorkspaceException, RepositoryException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void shutdown() {
+ // TODO Auto-generated method stub
+
+ }
/*
* UTILITIES
resUrl = resUrl.substring(1);
String pkg = resUrl.substring(0, resUrl.lastIndexOf('/')).replace('/',
'.');
- ServiceReference paSr = bundleContext
- .getServiceReference(PackageAdmin.class.getName());
+ ServiceReference<PackageAdmin> paSr = bundleContext
+ .getServiceReference(PackageAdmin.class);
PackageAdmin packageAdmin = (PackageAdmin) bundleContext
.getService(paSr);