@Test public void testGetAttribute() { String attr = "attribute"; Object result = new Object(); expect(session.getAttribute(attr)).andReturn(result); replay(session); replay(sessionFactory); assertSame(jcrTemplate.getAttribute(attr), result); }
@Override public Object getAttribute(final String name) { return execute(new JcrCallback<Object>() { @Override public Object doInJcr(Session session) throws RepositoryException { return session.getAttribute(name); } }, true); }
JcrTemplate extends JcrAccessor implements JcrOperations { @Override public Object getAttribute(final String name) { return execute(new JcrCallback<Object>() { @Override public Object doInJcr(Session session) throws RepositoryException { return session.getAttribute(name); } }, true); } }
JcrTemplate extends JcrAccessor implements JcrOperations { @Override public Object getAttribute(final String name) { return execute(new JcrCallback<Object>() { @Override public Object doInJcr(Session session) throws RepositoryException { return session.getAttribute(name); } }, true); } JcrTemplate();  JcrTemplate(SessionFactory sessionFactory); }
JcrTemplate extends JcrAccessor implements JcrOperations { @Override public Object getAttribute(final String name) { return execute(new JcrCallback<Object>() { @Override public Object doInJcr(Session session) throws RepositoryException { return session.getAttribute(name); } }, true); } JcrTemplate();  JcrTemplate(SessionFactory sessionFactory); @Override T execute(JcrCallback<T> action, boolean exposeNativeSession); @Override T execute(JcrCallback<T> callback); @Override void addLockToken(final String lock); @Override Object getAttribute(final String name); @Override String[] getAttributeNames(); @Override ContentHandler getImportContentHandler(final String parentAbsPath, final int uuidBehavior); @Override Item getItem(final String absPath); @Override String[] getLockTokens(); @Override String getNamespacePrefix(final String uri); @Override String[] getNamespacePrefixes(); @Override String getNamespaceURI(final String prefix); @Override @Deprecated Node getNodeByUUID(final String uuid); @Override Node getNodeByIdentifier(final String id); @Override Node getRootNode(); @Override String getUserID(); @Override ValueFactory getValueFactory(); @Override boolean hasPendingChanges(); @Override void importXML(final String parentAbsPath, final InputStream in, final int uuidBehavior); @Override void refresh(final boolean keepChanges); @Override void removeLockToken(final String lt); @Override void rename(final Node node, final String newName); @Override void setNamespacePrefix(final String prefix, final String uri); @Override boolean isLive(); @Override boolean itemExists(final String absPath); @Override void move(final String srcAbsPath, final String destAbsPath); @Override void save(); @Override String dump(final Node node); @Override QueryResult query(final Node node); @Override QueryResult query(final String statement); @Override QueryResult query(final String statement, final String language); @Override Map<String, QueryResult> query(final List<String> list); @Override Map<String, QueryResult> query(final List<String> list, final String language, final boolean ignoreErrors); boolean isAllowCreate(); void setAllowCreate(boolean allowCreate); boolean isExposeNativeSession(); void setExposeNativeSession(boolean exposeNativeSession); }
JcrTemplate extends JcrAccessor implements JcrOperations { @Override public Object getAttribute(final String name) { return execute(new JcrCallback<Object>() { @Override public Object doInJcr(Session session) throws RepositoryException { return session.getAttribute(name); } }, true); } JcrTemplate();  JcrTemplate(SessionFactory sessionFactory); @Override T execute(JcrCallback<T> action, boolean exposeNativeSession); @Override T execute(JcrCallback<T> callback); @Override void addLockToken(final String lock); @Override Object getAttribute(final String name); @Override String[] getAttributeNames(); @Override ContentHandler getImportContentHandler(final String parentAbsPath, final int uuidBehavior); @Override Item getItem(final String absPath); @Override String[] getLockTokens(); @Override String getNamespacePrefix(final String uri); @Override String[] getNamespacePrefixes(); @Override String getNamespaceURI(final String prefix); @Override @Deprecated Node getNodeByUUID(final String uuid); @Override Node getNodeByIdentifier(final String id); @Override Node getRootNode(); @Override String getUserID(); @Override ValueFactory getValueFactory(); @Override boolean hasPendingChanges(); @Override void importXML(final String parentAbsPath, final InputStream in, final int uuidBehavior); @Override void refresh(final boolean keepChanges); @Override void removeLockToken(final String lt); @Override void rename(final Node node, final String newName); @Override void setNamespacePrefix(final String prefix, final String uri); @Override boolean isLive(); @Override boolean itemExists(final String absPath); @Override void move(final String srcAbsPath, final String destAbsPath); @Override void save(); @Override String dump(final Node node); @Override QueryResult query(final Node node); @Override QueryResult query(final String statement); @Override QueryResult query(final String statement, final String language); @Override Map<String, QueryResult> query(final List<String> list); @Override Map<String, QueryResult> query(final List<String> list, final String language, final boolean ignoreErrors); boolean isAllowCreate(); void setAllowCreate(boolean allowCreate); boolean isExposeNativeSession(); void setExposeNativeSession(boolean exposeNativeSession);  }