Package org.apache.slide.lock

Examples of org.apache.slide.lock.NodeLock


            super.removeLock(uri, lock);
        }
        else {
            try {
                ResourceId resourceId = obtainResourceId(uri);
                NodeLock lockClone = lock.cloneObject();
                lockClone.setObjectUri(resourceId.getUuri()); // switch to uuri
                resourceId.getStore().removeLock(resourceId, lockClone);
            }
            catch (ObjectNotFoundException e) {
                throw new ServiceAccessException(this, e);
            }
View Full Code Here


            super.killLock(uri, lock);
        }
        else {
            try {
                ResourceId resourceId = obtainResourceId(uri);
                NodeLock lockClone = lock.cloneObject();
                lockClone.setObjectUri(resourceId.getUuri()); // switch to uuri
                resourceId.getStore().killLock(resourceId, lockClone);
            }
            catch (ObjectNotFoundException e) {
                throw new ServiceAccessException(this, e);
            }
View Full Code Here

            try {
                ResourceId resourceId = obtainResourceId(uri);
                Enumeration locks = resourceId.getStore().enumerateLocks(resourceId);
                Vector result = new Vector();
                while (locks.hasMoreElements()) {
                    NodeLock l = ((NodeLock)locks.nextElement()).cloneObject();
                    l.setObjectUri(uri.toString()); // switch to uri
                    result.add(l);
                }
                return result.elements();
            }
            catch (ObjectNotFoundException e) {
View Full Code Here

               
                writer.print("<tr" + (shade ? " bgcolor=\"eeeeee\""
                                            : " bgcolor=\"dddddd\"") +
                             ">\r\n");
               
                NodeLock currentLock = (NodeLock) locksList.nextElement();
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getSubjectUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getTypeUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print
                    (formatter.format(currentLock.getExpirationDate()));
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isInheritable());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isExclusive());
                writer.print("</tt></td>\r\n");
               
            }
           
        }
View Full Code Here

               
                writer.print("<tr" + (shade ? " bgcolor=\"eeeeee\""
                                            : " bgcolor=\"dddddd\"") +
                             ">\r\n");
               
                NodeLock currentLock = (NodeLock) locksList.nextElement();
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getSubjectUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getTypeUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print
                    (formatter.format(currentLock.getExpirationDate()));
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isInheritable());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isExclusive());
                writer.print("</tt></td>\r\n");
               
            }
           
        }
View Full Code Here

               
                writer.print("<tr" + (shade ? " bgcolor=\"eeeeee\""
                                            : " bgcolor=\"dddddd\"") +
                             ">\r\n");
               
                NodeLock currentLock = (NodeLock) locksList.nextElement();
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getSubjectUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getTypeUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print
                    (formatter.format(currentLock.getExpirationDate()));
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isInheritable());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isExclusive());
                writer.print("</tt></td>\r\n");
               
            }
           
        }
View Full Code Here

               
                writer.print("<tr" + (shade ? " bgcolor=\"eeeeee\""
                                            : " bgcolor=\"dddddd\"") +
                             ">\r\n");
               
                NodeLock currentLock = (NodeLock) locksList.nextElement();
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getSubjectUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getTypeUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print
                    (formatter.format(currentLock.getExpirationDate()));
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isInheritable());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isExclusive());
                writer.print("</tt></td>\r\n");
               
            }
           
        }
View Full Code Here

     */
    public Enumeration getSourceLocks() throws SourceException {
        try {
            Vector sourcelocks = new Vector();

            NodeLock lock;

            for (Enumeration locks = this.lock.enumerateLocks(this.slideToken,
                this.config.getFilesPath()+this.path, false);
                locks.hasMoreElements(); ) {
                lock = (NodeLock) locks.nextElement();

                sourcelocks.addElement(new SourceLock(lock.getSubjectUri(),
                                                      lock.getTypeUri(),
                                                      lock.getExpirationDate(),
                                                      lock.isInheritable(),
                                                      lock.isExclusive()));
            }

            return sourcelocks.elements();
        } catch (SlideException se) {
            throw new SourceException("Could not retrieve locks", se);
View Full Code Here

               
                writer.print("<tr" + (shade ? " bgcolor=\"eeeeee\""
                                            : " bgcolor=\"dddddd\"") +
                             ">\r\n");
               
                NodeLock currentLock = (NodeLock) locksList.nextElement();
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getSubjectUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getTypeUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print
                    (formatter.format(currentLock.getExpirationDate()));
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isInheritable());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isExclusive());
                writer.print("</tt></td>\r\n");
               
            }
           
        }
View Full Code Here

                } else {
                    writer.print(" bgcolor=\"eeeeee\"");
                }
                writer.print(">\r\n");
               
                NodeLock currentLock = (NodeLock) locksList.nextElement();
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getSubjectUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"left\"><tt>");
                writer.print(currentLock.getTypeUri());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print
                    (formatter.format(currentLock.getExpirationDate()));
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isInheritable());
                writer.print("</tt></td>\r\n");
               
                writer.print("<td align=\"right\"><tt>");
                writer.print(currentLock.isExclusive());
                writer.print("</tt></td>\r\n");
               
            }
           
        }
View Full Code Here

TOP

Related Classes of org.apache.slide.lock.NodeLock

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.