Package org.apache.sling.api.resource

Examples of org.apache.sling.api.resource.ResourceResolver.refresh()


                        writerResolver.delete(foundResource);
                        writerResolver.commit();
                    } catch (final PersistenceException pe) {
                        // we ignore this
                        this.ignoreException(pe);
                        writerResolver.refresh();
                    }
                }

                try {
                    // create properties
View Full Code Here


                                resolver.commit();
                            }
                        } catch ( final PersistenceException pe) {
                            batchRemove = false;
                            this.ignoreException(pe);
                            resolver.refresh();
                        }
                    } else {
                        break;
                    }
                }
View Full Code Here

                }
                try {
                    resolver.commit();
                } catch ( final PersistenceException pe) {
                    this.ignoreException(pe);
                    resolver.refresh();
                }
            } finally {
                resolver.close();
            }
        }
View Full Code Here

            sb.append(lockName);
            final String path = sb.toString();

            Resource lockResource = resolver.getResource(path);
            if ( lockResource == null ) {
                resolver.refresh();
                try {
                    final Map<String, Object> props = new HashMap<String, Object>();
                    props.put(Utility.PROPERTY_LOCK_CREATED, Calendar.getInstance());
                    props.put(Utility.PROPERTY_LOCK_CREATED_APP, Environment.APPLICATION_ID);
                    props.put(ResourceResolver.PROPERTY_RESOURCE_TYPE, Utility.RESOURCE_TYPE_LOCK);
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.