Examples of PentahoJcrConstants


Examples of org.pentaho.platform.repository2.unified.jcr.PentahoJcrConstants

    txnTemplate.execute( new TransactionCallbackWithoutResult() {
      public void doInTransactionWithoutResult( final TransactionStatus status ) {
        adminJcrTemplate.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();
            try {
              privilegeManager.getPrivilege( pentahoJcrConstants.getPHO_ACLMANAGEMENT_PRIVILEGE() );
            } catch ( AccessControlException ace ) {
              privilegeManager.registerPrivilege( pentahoJcrConstants.getPHO_ACLMANAGEMENT_PRIVILEGE(), false,
                  new String[0] );
            }
            session.save();
            return null;
          }
View Full Code Here

Examples of org.pentaho.platform.repository2.unified.jcr.PentahoJcrConstants

  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();
        try {
          privilegeManager.getPrivilege( pentahoJcrConstants.getPHO_ACLMANAGEMENT_PRIVILEGE() );
        } catch ( AccessControlException ace ) {
          privilegeManager.registerPrivilege( pentahoJcrConstants.getPHO_ACLMANAGEMENT_PRIVILEGE(), false,
            new String[0] );
        }
        session.save();
        return null;
      }
View Full Code Here

Examples of org.pentaho.platform.repository2.unified.jcr.PentahoJcrConstants

  public List<ITenant> getChildTenants( Session session, final ITenant parentTenant,
      final boolean includeDisabledTenants ) throws RepositoryException {
    List<ITenant> children = new ArrayList<ITenant>();
    List<RepositoryFile> allChildren =
        JcrRepositoryFileUtils.getChildren( session, new PentahoJcrConstants( session ), pathConversionHelper, null,
            getTenantRootFolder( session, parentTenant ).getId(), null );
    for ( RepositoryFile repoFile : allChildren ) {
      Map<String, Serializable> metadata = JcrRepositoryFileUtils.getFileMetadata( session, repoFile.getId() );
      if ( metadata.containsKey( ITenantManager.TENANT_ROOT )
        && (Boolean) metadata.get( ITenantManager.TENANT_ROOT ) ) {
View Full Code Here

Examples of org.pentaho.platform.repository2.unified.jcr.PentahoJcrConstants

        Map<String, Serializable> fileMeta = repositoryFileDao.getFileMetadata( systemTenantFolder.getId() );
        fileMeta.put( ITenantManager.TENANT_ROOT, true );
        fileMeta.put( ITenantManager.TENANT_ENABLED, true );
        JcrRepositoryFileUtils.setFileMetadata( session, systemTenantFolder.getId(), fileMeta );

        createRuntimeRolesFolderNode( session, new PentahoJcrConstants( session ), tenant );
        return systemTenantFolder;
      }
    } );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.