Package org.springframework.extensions.jcr

Examples of org.springframework.extensions.jcr.JcrCallback


    assertNull( userRoleDaoProxy.getRole( UNKNOWN_TENANT, UNKNOWN_ROLE ) );
    assertNull( userRoleDaoProxy.getRole( null, UNKNOWN_ROLE ) );
  }

  private void setAclManagement() {
    testJcrTemplate.execute( new JcrCallback() {
      @Override
      public Object doInJcr( Session session ) throws IOException, RepositoryException {
        PentahoJcrConstants pentahoJcrConstants = new PentahoJcrConstants( session );
        Workspace workspace = session.getWorkspace();
        PrivilegeManager privilegeManager = ( (JackrabbitWorkspace) workspace ).getPrivilegeManager();
View Full Code Here


    assertNull( userRoleDaoProxy.getRole( UNKNOWN_TENANT, UNKNOWN_ROLE ) );
    assertNull( userRoleDaoProxy.getRole( null, UNKNOWN_ROLE ) );
  }

  private void setAclManagement() {
    testJcrTemplate.execute( new JcrCallback() {
      @Override
      public Object doInJcr( Session session ) throws IOException, RepositoryException {
        PentahoJcrConstants pentahoJcrConstants = new PentahoJcrConstants( session );
        Workspace workspace = session.getWorkspace();
        PrivilegeManager privilegeManager = ( (JackrabbitWorkspace) workspace ).getPrivilegeManager();
View Full Code Here

    userRoleDao.createUser( systemTenant, sysAdminUserName, "password", "", new String[] { tenantAdminRoleName } );
    logout();
  }

  private void setAclManagement() {
    testJcrTemplate.execute( new JcrCallback() {
      @Override
      public Object doInJcr( Session session ) throws IOException, RepositoryException {
        PentahoJcrConstants pentahoJcrConstants = new PentahoJcrConstants( session );
        Workspace workspace = session.getWorkspace();
        PrivilegeManager privilegeManager = ( (JackrabbitWorkspace) workspace ).getPrivilegeManager();
View Full Code Here

      // run as repo super user
      PentahoSessionHolder.setSession( createRepositoryAdminPentahoSession( repositoryAdminUsername ) );
      try {
        txnTemplate.execute( new TransactionCallbackWithoutResult() {
          public void doInTransactionWithoutResult( final TransactionStatus status ) {
            jcrTemplate.execute( new JcrCallback() {
              public Object doInJcr( final Session session ) throws RepositoryException, IOException {
                switch ( mode ) {
                  case SYS: {
                    final boolean SKIP_BINARY = false;
                    final boolean NO_RECURSE = false;
View Full Code Here

      // run as repo super user
      PentahoSessionHolder.setSession( createRepositoryAdminPentahoSession( repositoryAdminUsername ) );
      try {
        txnTemplate.execute( new TransactionCallbackWithoutResult() {
          public void doInTransactionWithoutResult( final TransactionStatus status ) {
            jcrTemplate.execute( new JcrCallback() {
              public Object doInJcr( final Session session ) throws RepositoryException, IOException {
                switch ( mode ) {
                  case SYS: {
                    final boolean SKIP_BINARY = false;
                    final boolean NO_RECURSE = false;
View Full Code Here

  }

  public void addMetadataToRepository( final String metadataProperty ) {
    txnTemplate.execute( new TransactionCallbackWithoutResult() {
      public void doInTransactionWithoutResult( final TransactionStatus status ) {
        adminJcrTemplate.execute( new JcrCallback() {
          @Override
          public Object doInJcr( Session session ) throws IOException, RepositoryException {
            new PentahoJcrConstants( session );
            String absPath = ServerRepositoryPaths.getPentahoRootFolderPath();
            RepositoryFile rootFolder =
View Full Code Here

  public Boolean doesMetadataExists( final String metadataProperty ) {
    try {
      return (Boolean) txnTemplate.execute( new TransactionCallback() {
        @Override
        public Object doInTransaction( TransactionStatus status ) {
          return adminJcrTemplate.execute( new JcrCallback() {
            @Override
            public Object doInJcr( Session session ) throws IOException, RepositoryException {
              PentahoJcrConstants pentahoJcrConstants = new PentahoJcrConstants( session );
              String absPath = ServerRepositoryPaths.getPentahoRootFolderPath();
              RepositoryFile rootFolder =
View Full Code Here

  }

  @Override
  public void setRoleMembers( final ITenant tenant, final String roleName, final String[] memberUserNames ) {
    try {
      adminJcrTemplate.execute( new JcrCallback() {
        @Override
        public Object doInJcr( Session session ) throws IOException, RepositoryException {
          setRoleMembers( session, tenant, roleName, memberUserNames );
          return null;
        }
View Full Code Here

  @Override
  public void setUserRoles( final ITenant tenant, final String userName, final String[] roles )
    throws NotFoundException, UncategorizedUserRoleDaoException {
    try {
      adminJcrTemplate.execute( new JcrCallback() {
        @Override
        public Object doInJcr( Session session ) throws IOException, RepositoryException {
          setUserRoles( session, tenant, userName, roles );
          return null;
        }
View Full Code Here

  @Override
  public IPentahoRole createRole( final ITenant tenant, final String roleName, final String description,
      final String[] memberUserNames ) throws AlreadyExistsException, UncategorizedUserRoleDaoException {
    try {
      return (IPentahoRole) adminJcrTemplate.execute( new JcrCallback() {
        @Override
        public Object doInJcr( Session session ) throws IOException, RepositoryException {
          return createRole( session, tenant, roleName, description, memberUserNames );
        }
      } );
View Full Code Here

TOP

Related Classes of org.springframework.extensions.jcr.JcrCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.