Examples of SlideTokenImpl


Examples of org.apache.slide.common.SlideTokenImpl

    public static void addMember(NamespaceAccessToken nat,
                                 String caller,
                                 String objectUri,
                                 String subjectUri) throws Exception {
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Structure structure = nat.getStructureHelper();
        Content content = nat.getContentHelper();
       
        try {
           
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

    public static void removeMember(NamespaceAccessToken nat,
                                    String caller,
                                    String objectUri,
                                    String subjectUri) throws Exception {
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Content content = nat.getContentHelper();
       
        try {
           
            NodeRevisionDescriptors revisions = content.retrieve(slideToken,objectUri);
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

                                      String password) throws Exception {
       
        String usersPath = nat.getNamespaceConfig().getUsersPath();
        String userUri = usersPath + "/" + username;
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Content content = nat.getContentHelper();
       
        try {
           
            nat.begin();
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

                                       String caller,
                                       String path) throws Exception {
                                          
        String uri = getUriFromPath(nat,path);
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Security security = nat.getSecurityHelper();
       
        List result = new ArrayList();
        try {
            nat.begin();
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

                                 String caller,
                                 String path) throws Exception {

        String uri = getUriFromPath(nat,path);
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Lock lock = nat.getLockHelper();
       
        List result = new ArrayList();
        try {
            nat.begin();
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

                                        String subject,
                                        String action) throws Exception {

        String uri = getUriFromPath(nat,path);
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Security security = nat.getSecurityHelper();
       
        try {
            NodePermission permission = new NodePermission(uri,subject,action);
            nat.begin();
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

                                     String inheritable,
                                     String negative) throws Exception {
                                        
        String uri = getUriFromPath(nat,path);
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Security security = nat.getSecurityHelper();
       
        boolean isInheritable  = Boolean.valueOf(inheritable).booleanValue();
        boolean isNegative     = Boolean.valueOf(negative).booleanValue();
       
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

    public static void removeLock(NamespaceAccessToken nat,
                                  String caller,
                                  String uri,
                                  String lockId) throws Exception {
       
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Lock lock = nat.getLockHelper();
       
        try {
            nat.begin();
            lock.unlock(slideToken,uri,lockId);
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

      
       // expiration in minutes
       int intExpiration = Integer.valueOf(expiration).intValue();
       Date expire = new Date(System.currentTimeMillis() + intExpiration*1000*60);
      
       SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
       Lock lock = nat.getLockHelper();
      
       try {
           nat.begin();
           lock.lock(slideToken,new NodeLock(uri,subject,type,expire,isExclusive,isInherit));
View Full Code Here

Examples of org.apache.slide.common.SlideTokenImpl

            // we store the principal name instead of the principal itself
            session.setAttribute(CREDENTIALS_ATTRIBUTE, principal.getName());
            credentialsToken = new CredentialsToken(principal);
        }
       
        SlideToken token = new SlideTokenImpl(credentialsToken);
        token.setEnforceLockTokens(true);

        // store session attributes in token parameters to pass them through
        // to the stores
        for(Enumeration e = session.getAttributeNames(); e.hasMoreElements();) {
            String name = (String)e.nextElement();
            token.addParameter(name, session.getAttribute(name));
        }
       
        return token;
    }
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.