Java Code Examples for javax.jcr.NodeIterator#nextNode()

The following examples show how to use javax.jcr.NodeIterator#nextNode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StorageUpdate3.java    From nextreports-server with Apache License 2.0 6 votes vote down vote up
private void renameChartWidgetClassName() throws RepositoryException {
	LOG.info("Rename chart widget class name");
	
	String path = StorageConstants.DASHBOARDS_ROOT;
	String className = "ro.nextreports.server.web.chart.ChartWidget";
	String newClassName = "ro.nextreports.server.web.dashboard.chart.ChartWidget";
       String statement = "/jcr:root" + ISO9075.encodePath(path) + "//*[@widgetClassName='" + className + "']";
       QueryResult queryResult = getTemplate().query(statement);

       NodeIterator nodes = queryResult.getNodes();
       LOG.info("Found " + nodes.getSize() + " nodes");
       while (nodes.hasNext()) {
       	Node node = nodes.nextNode();
       	node.setProperty("widgetClassName", newClassName);
       }
       
       getTemplate().save();
}
 
Example 2
Source File: StorageUpdate6.java    From nextreports-server with Apache License 2.0 6 votes vote down vote up
private void addAnalystUserProfile() throws RepositoryException {
	LOG.info("User profile analyst");

	String path = StorageConstants.USERS_ROOT ;
	String className = "ro.nextreports.server.domain.User";
       String statement = "/jcr:root" + ISO9075.encodePath(path) + "//*[@className='" + className + "']";
       QueryResult queryResult = getTemplate().query(statement);

       NodeIterator nodes = queryResult.getNodes();
       LOG.info("Found " + nodes.getSize() + " nodes");
       while (nodes.hasNext()) {
       	Node node = nodes.nextNode();
       	node.setProperty("profile", "analyst");
       }

       getTemplate().save();
}
 
Example 3
Source File: StorageUpdate12.java    From nextreports-server with Apache License 2.0 6 votes vote down vote up
private void addRuntimeNameProperty() throws RepositoryException {
	
	String statement = 
			"/jcr:root" + ISO9075.encodePath(StorageConstants.REPORTS_ROOT) + 
			"//*[@className='ro.nextreports.server.domain.Report']" + 
			"//*[fn:name()='parametersValues']";
	  
	QueryResult queryResult = getTemplate().query(statement);

	NodeIterator nodes = queryResult.getNodes();
	
	LOG.info("RuntimeHistory : Found " + nodes.getSize() + " parameterValues nodes");
	while (nodes.hasNext()) {			
		Node node = nodes.nextNode();
		NodeIterator childrenIt = node.getNodes();
		while (childrenIt.hasNext()) {
			Node child = childrenIt.nextNode();				
			child.setProperty("runtimeName", child.getName());
		}
	}	
	getTemplate().save();		
}
 
Example 4
Source File: RepositoryServiceImpl.java    From urule with Apache License 2.0 6 votes vote down vote up
private void unlockAllChildNodes(Node node,User user,List<Node> nodeList,String rootPath) throws Exception{
	NodeIterator iter=node.getNodes();
	while(iter.hasNext()){
		Node nextNode=iter.nextNode();
		String absPath=nextNode.getPath();
		if(!lockManager.isLocked(absPath)){
			continue;
		}
		Lock lock=lockManager.getLock(absPath);
		String owner=lock.getLockOwner();
		if(!user.getUsername().equals(owner)){
			throw new NodeLockException("当前目录下有子目录被其它人锁定,您不能执行锁定"+rootPath+"目录");
		}
		nodeList.add(nextNode);
		unlockAllChildNodes(nextNode, user, nodeList, rootPath);
	}
}
 
Example 5
Source File: StorageUpdate8.java    From nextreports-server with Apache License 2.0 6 votes vote down vote up
private void updateInternalSettings() throws RepositoryException {
	// find all internalSettings nodes from DASHBOARDS and change chartId property in entityId
	String statement = "/jcr:root" + ISO9075.encodePath(StorageConstants.DASHBOARDS_ROOT) + "//*[fn:name()='internalSettings']";
    QueryResult queryResult = getTemplate().query(statement);
    NodeIterator nodes = queryResult.getNodes();
    LOG.info("Found " + nodes.getSize() +  " internalSettings nodes");
    while (nodes.hasNext()) {
    	Node node = nodes.nextNode();
    	try {
    		Property prop = node.getProperty("chartId");
    		node.setProperty("entityId", prop.getValue());
    		prop.remove();
    	} catch (PathNotFoundException ex) {
    		// if property not found we have nothing to do
    	}
    } 	
}
 
Example 6
Source File: RepositoryRefactor.java    From urule with Apache License 2.0 6 votes vote down vote up
private void buildPath(List<String> list, Node parentNode) throws RepositoryException {
	NodeIterator nodeIterator=parentNode.getNodes();
	while(nodeIterator.hasNext()){
		Node node=nodeIterator.nextNode();
		String nodePath=node.getPath();
		if(nodePath.endsWith(FileType.Ruleset.toString())){
			list.add(nodePath);
		}else if(nodePath.endsWith(FileType.UL.toString())){
			list.add(nodePath);
		}else if(nodePath.endsWith(FileType.DecisionTable.toString())){
			list.add(nodePath);
		}else if(nodePath.endsWith(FileType.ScriptDecisionTable.toString())){
			list.add(nodePath);
		}else if(nodePath.endsWith(FileType.DecisionTree.toString())){
			list.add(nodePath);					
		}else if(nodePath.endsWith(FileType.RuleFlow.toString())){
			list.add(nodePath);					
		}
		buildPath(list,node);
	}
}
 
Example 7
Source File: TestBase.java    From sling-whiteboard with Apache License 2.0 6 votes vote down vote up
static void visitRecursively(Node n, Predicate<String> pathFilter, Set<String> allPathsFound) throws RepositoryException {
    if(!"/".equals(n.getPath()) && !pathFilter.test(n.getPath())) {
        return;
    }
    log.debug("visit({})", n.getPath());

    if(allPathsFound != null) {
        allPathsFound.add(n.getPath());
    }

    final NodeIterator it = n.getNodes();
    while(it.hasNext()) {
        final Node next = it.nextNode();
        visitRecursively(next, pathFilter, allPathsFound);
    }
}
 
Example 8
Source File: Purge.java    From APM with Apache License 2.0 6 votes vote down vote up
private void purge(final Context context, final ActionResult actionResult)
    throws RepositoryException, ActionExecutionException {
  NodeIterator iterator = getPermissions(context);
  String normalizedPath = normalizePath(path);
  while (iterator != null && iterator.hasNext()) {
    Node node = iterator.nextNode();
    if (node.hasProperty(PermissionConstants.REP_ACCESS_CONTROLLED_PATH)) {
      String parentPath = node.getProperty(PermissionConstants.REP_ACCESS_CONTROLLED_PATH)
          .getString();
      String normalizedParentPath = normalizePath(parentPath);
      boolean isUsersPermission = parentPath.startsWith(context.getCurrentAuthorizable().getPath());
      if (StringUtils.startsWith(normalizedParentPath, normalizedPath) && !isUsersPermission) {
        RemoveAll removeAll = new RemoveAll(parentPath);
        ActionResult removeAllResult = removeAll.execute(context);
        if (Status.ERROR.equals(removeAllResult.getStatus())) {
          copyErrorMessages(removeAllResult, actionResult);
        }
      }
    }
  }
}
 
Example 9
Source File: JcrExporter.java    From jackrabbit-filevault with Apache License 2.0 6 votes vote down vote up
private void scan(Node dir) throws RepositoryException {
    NodeIterator iter = dir.getNodes();
    while (iter.hasNext()) {
        Node child = iter.nextNode();
        String name = child.getName();
        if (".svn".equals(name) || ".vlt".equals(name)) {
            continue;
        }
        if (child.isNodeType(JcrConstants.NT_FOLDER)) {
            exportInfo.update(ExportInfo.Type.RMDIR, child.getPath());
            scan(child);
        } else if (child.isNodeType(JcrConstants.NT_FILE)) {
            exportInfo.update(ExportInfo.Type.DELETE, child.getPath());
        }
    }
}
 
Example 10
Source File: ChildNodeStash.java    From jackrabbit-filevault with Apache License 2.0 5 votes vote down vote up
/**
 * Moves the stashed nodes back below the given parent path.
 * @param parent the new parent node
 * @param importInfo the import info to record the changes
 * @throws RepositoryException if an error occurrs
 */
public void recoverChildren(Node parent, ImportInfo importInfo) throws RepositoryException {
    // move the old child nodes back
    if (tmpNode != null) {
        NodeIterator iter = tmpNode.getNodes();
        boolean hasErrors = false;
        while (iter.hasNext()) {
            Node child = iter.nextNode();
            String newPath = parent.getPath() + "/" + child.getName();
            try {
                if (session.nodeExists(newPath)) {
                    log.debug("Skipping restore from temporary location {} as node already exists at {}", child.getPath(), newPath);
                } else {
                    session.move(child.getPath(), newPath);
                }
            } catch (RepositoryException e) {
                log.warn("Unable to move child back to new location at {} due to: {}. Node will remain in temporary location: {}",
                        new Object[]{newPath, e.getMessage(), child.getPath()});
                if (importInfo != null) {
                    importInfo.onError(newPath, e);
                    hasErrors = true;
                }
            }
        }
        if (!hasErrors) {
            tmpNode.remove();
        }
    }
}
 
Example 11
Source File: JcrStorageDao.java    From nextreports-server with Apache License 2.0 5 votes vote down vote up
public Entity[] getBaseEntityChildren(String path) throws NotFoundException {
	checkPath(path);

	Node node = getNode(path);
	try {
		if (!node.hasNodes()) {
			return new Entity[0];
		}

		List<Entity> entities = new ArrayList<Entity>();
		NodeIterator nodes = node.getNodes();
		while (nodes.hasNext()) {
			Node child = nodes.nextNode();
			if (child.getName().endsWith("_history")) {
				continue;
			}
			Entity entity = getEntity(child);
			if (entity != null) {
				entities.add(entity);
			}

		}

		return entities.toArray(new Entity[entities.size()]);
	} catch (RepositoryException e) {
		throw convertJcrAccessException(e);
	}
}
 
Example 12
Source File: StorageUpdate11.java    From nextreports-server with Apache License 2.0 5 votes vote down vote up
private void convertReports() throws RepositoryException {
	
	String statement = 
			"/jcr:root" + ISO9075.encodePath(StorageConstants.REPORTS_ROOT) + 
			"//*[@className='ro.nextreports.server.domain.Report' and @type='Next']" + 
			"//*[fn:name()='jcr:content' and @jcr:mimeType='text/xml']";
	  
	QueryResult queryResult = getTemplate().query(statement);

	NodeIterator nodes = queryResult.getNodes();
	LOG.info("Converter 5.1 : Found " + nodes.getSize() + " report nodes");
	while (nodes.hasNext()) {
		
		Node node = nodes.nextNode();
		
		Node reportNode = node.getParent().getParent().getParent().getParent();
		String reportName = reportNode.getName();
		String reportPath = reportNode.getPath();	
		LOG.info(" * Start convert '" + reportPath + "'");						
											
		Property prop = node.getProperty("jcr:data");			
       	String xml = null;
           try {                  	
           	xml = new Converter_5_2().convertFromInputStream(prop.getBinary().getStream(), true);            	            	
           	if (xml != null) {
               	ValueFactory valueFactory = node.getSession().getValueFactory(); 
               	Binary binaryValue = valueFactory.createBinary(new ByteArrayInputStream(xml.getBytes("UTF-8")));
               	node.setProperty ("jcr:data", binaryValue);                	
               	LOG.info("\t -> OK");
               } else {
               	LOG.error("\t -> FAILED : null xml");
               }
           	            	            	
           } catch (Throwable t) {                    	            	            
           	LOG.error("\t-> FAILED : " + t.getMessage(), t);            	
           } 					
           
	}
}
 
Example 13
Source File: JcrPackageRegistry.java    From jackrabbit-filevault with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public PackageId resolve(Dependency dependency, boolean onlyInstalled) throws IOException {
    try {
        PackageId bestId = null;
        for (Node root: getPackageRoots()) {
            if (!root.hasNode(dependency.getGroup())) {
                continue;
            }
            Node groupNode = root.getNode(dependency.getGroup());
            NodeIterator iter = groupNode.getNodes();
            while (iter.hasNext()) {
                Node child = iter.nextNode();
                if (".snapshot".equals(child.getName())) {
                    continue;
                }
                try (JcrPackageImpl pack = new JcrPackageImpl(this, child)) {
                    if (pack.isValid()) {
                        if (onlyInstalled && !pack.isInstalled()) {
                            continue;
                        }
                        PackageId id = pack.getDefinition().getId();
                        if (dependency.matches(id)) {
                            if (bestId == null || id.getVersion().compareTo(bestId.getVersion()) > 0) {
                                bestId = id;
                            }
                        }
                    }
                }
            }
        } 
        if (bestId == null && baseRegistry != null) {
            bestId = baseRegistry.resolve(dependency, onlyInstalled);
        }
        return bestId;
    } catch (RepositoryException e) {
        throw new IOException(e);
    }
}
 
Example 14
Source File: RepositoryCopier.java    From jackrabbit-filevault with Apache License 2.0 5 votes vote down vote up
private void trackTree(Node node, boolean isNew) throws RepositoryException {
    NodeIterator iter = node.getNodes();
    while (iter.hasNext()) {
        Node child = iter.nextNode();
        if (isNew) {
            track(child.getPath(), "%06d A", ++totalNodes);
        } else {
            track(child.getPath(), "%06d U", ++totalNodes);
        }
        trackTree(child, isNew);
    }
}
 
Example 15
Source File: CatalogDataResourceProviderManagerImpl.java    From commerce-cif-connector with Apache License 2.0 5 votes vote down vote up
/**
 * Find all existing virtual catalog data roots using all query defined in service configuration.
 *
 * @param resolver Resource resolver
 * @return all virtual catalog roots
 */
@SuppressWarnings("unchecked")
private List<Resource> findDataRoots(ResourceResolver resolver) {
    List<Resource> allResources = new ArrayList<>();
    for (String queryString : this.findAllQueries) {
        if (!StringUtils.contains(queryString, "|")) {
            throw new IllegalArgumentException("Query string does not contain query syntax seperated by '|': " + queryString);
        }
        String queryLanguage = StringUtils.substringBefore(queryString, "|");
        String query = StringUtils.substringAfter(queryString, "|");
        // data roots are JCR nodes, so we prefer JCR query because the resource resolver appears to be unreliable
        // when we are in the middle of registering/unregistering resource providers
        try {
            Session session = resolver.adaptTo(Session.class);
            Workspace workspace = session.getWorkspace();
            QueryManager qm = workspace.getQueryManager();
            Query jcrQuery = qm.createQuery(query, queryLanguage);
            QueryResult result = jcrQuery.execute();
            NodeIterator nodes = result.getNodes();
            while (nodes.hasNext()) {
                Node node = nodes.nextNode();
                Resource resource = resolver.getResource(node.getPath());
                if (resource != null) {
                    allResources.add(resource);
                }
            }
        } catch (RepositoryException x) {
            log.error("Error finding data roots", x);
        }
    }
    dataRoots = allResources;
    return allResources;
}
 
Example 16
Source File: StorageUpdate7.java    From nextreports-server with Apache License 2.0 5 votes vote down vote up
private void addDestinations() throws RepositoryException {
	LOG.info("Add destinations to scheduler jobs");

	String path = StorageConstants.SCHEDULER_ROOT ;
	String className = "ro.nextreports.server.domain.SchedulerJob";
       String statement = "/jcr:root" + ISO9075.encodePath(path) + "//*[@className='" + className + "']";
       QueryResult queryResult = getTemplate().query(statement);

       NodeIterator nodes = queryResult.getNodes();
       LOG.info("Found " + nodes.getSize() + " scheduler job nodes");
       while (nodes.hasNext()) {
       	Node node = nodes.nextNode();
       	if (node.hasNode("mail")) {
       		LOG.info("Found 'mail' node for '" + node.getName() + "'");
       		Node mailNode = node.getNode("mail");
       		LOG.info("Create '" + StorageConstants.DESTINATIONS + "' node for '" + node.getName() + "'");
       		Node destinationsNode = node.addNode(StorageConstants.DESTINATIONS);
       		className = SmtpDestination.class.getName();
       		LOG.info("Change 'className' property for 'mail' node to '" + className + "'");
       		mailNode.setProperty("className", className);
       		LOG.info("Move '" + mailNode.getName() + "' to '" + destinationsNode.getName() + "/mail");
       		getTemplate().move(mailNode.getPath(), destinationsNode.getPath() + "/mail");
       	}
       }

       getTemplate().save();
}
 
Example 17
Source File: RepositoryServiceImpl.java    From urule with Apache License 2.0 5 votes vote down vote up
@Override
public List<RepositoryFile> getDirectories(String project) throws Exception {
	Node rootNode=getRootNode();
	NodeIterator nodeIterator = rootNode.getNodes();
	Node targetProjectNode = null;
	while (nodeIterator.hasNext()) {
		Node projectNode = nodeIterator.nextNode();
		if (!projectNode.hasProperty(FILE)) {
			continue;
		}
		String projectName = projectNode.getName();
		if (project != null && !project.equals(projectName)) {
			continue;
		}
		targetProjectNode = projectNode;
		break;
	}
	if (targetProjectNode == null) {
		throw new RuleException("Project [" + project + "] not exist.");
	}
	List<RepositoryFile> fileList = new ArrayList<RepositoryFile>();
	RepositoryFile root = new RepositoryFile();
	root.setName("根目录");
	String projectPath = targetProjectNode.getPath();
	root.setFullPath(projectPath);
	fileList.add(root);
	NodeIterator projectNodeIterator = targetProjectNode.getNodes();
	while (projectNodeIterator.hasNext()) {
		Node dirNode = projectNodeIterator.nextNode();
		if (!dirNode.hasProperty(DIR_TAG)) {
			continue;
		}
		RepositoryFile file = new RepositoryFile();
		file.setName(dirNode.getPath().substring(projectPath.length()));
		file.setFullPath(dirNode.getPath());
		fileList.add(file);
		buildDirectories(dirNode, fileList, projectPath);
	}
	return fileList;
}
 
Example 18
Source File: StorageUpdate18.java    From nextreports-server with Apache License 2.0 5 votes vote down vote up
private void onUpdate() throws RepositoryException {
	
	String statement = "/jcr:root" + ISO9075.encodePath(StorageConstants.DATASOURCES_ROOT) + "//*[@className='ro.nextreports.server.domain.DataSource']";
       QueryResult queryResult = getTemplate().query(statement);

       NodeIterator nodes = queryResult.getNodes();
       LOG.info("Found " + nodes.getSize() +  " data sources nodes");
       while (nodes.hasNext()) {
       	Node node = nodes.nextNode();
       	Node propertiesNode = node.addNode(StorageConstants.PROPERTIES);
       }
	
	getTemplate().save();	
}
 
Example 19
Source File: DocViewSAXImporter.java    From jackrabbit-filevault with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
    log.trace("<- element {}", qName);
    try {
        // currentNode's import is finished, check if any child nodes
        // need to be removed
        NodeNameList childNames = stack.getChildNames();
        Node node = stack.getNode();
        int numChildren = 0;
        if (node == null) {
            DocViewAdapter adapter = stack.getAdapter();
            if (adapter != null) {
                adapter.endNode();
            }
            // close transformer if last in stack
            if (stack.adapter != null) {
                List<String> createdPaths = stack.adapter.close();
                for (String createdPath : createdPaths) {
                    importInfo.onCreated(createdPath);
                }
                stack.adapter = null;
                log.trace("Sysview transformation complete.");
            }
        } else {
            NodeIterator iter = node.getNodes();
            while (iter.hasNext()) {
                numChildren++;
                Node child = iter.nextNode();
                String path = child.getPath();
                String label = Text.getName(path);
                AccessControlHandling acHandling = getAcHandling(child.getName());
                if (!childNames.contains(label)
                        && !hints.contains(path)
                        && isIncluded(child, child.getDepth() - rootDepth)) {
                    // if the child is in the filter, it belongs to
                    // this aggregate and needs to be removed
                    if (aclManagement.isACLNode(child)) {
                        if (acHandling == AccessControlHandling.OVERWRITE
                                || acHandling == AccessControlHandling.CLEAR) {
                            importInfo.onDeleted(path);
                            aclManagement.clearACL(node);
                        }
                    } else {
                        if (wspFilter.getImportMode(path) == ImportMode.REPLACE) {
                            importInfo.onDeleted(path);
                            // check if child is not protected
                            if (child.getDefinition().isProtected()) {
                                log.debug("Refuse to delete protected child node: {}", path);
                            } else if (child.getDefinition().isMandatory()) {
                                log.debug("Refuse to delete mandatory child node: {}", path);
                            } else {
                                child.remove();
                            }
                        }
                    }
                } else if (acHandling == AccessControlHandling.CLEAR
                        && aclManagement.isACLNode(child)
                        && isIncluded(child, child.getDepth() - rootDepth)) {
                    importInfo.onDeleted(path);
                    aclManagement.clearACL(node);
                }
            }
            if (isIncluded(node, node.getDepth() - rootDepth)) {
                // ensure order
                stack.restoreOrder();
            }
        }
        stack = stack.pop();
        if (node != null && (numChildren == 0 && !childNames.isEmpty() || stack.isRoot())) {
            importInfo.addNameList(node.getPath(), childNames);
        }
    } catch (RepositoryException e) {
        throw new SAXException(e);
    }
}
 
Example 20
Source File: StorageUpdate16.java    From nextreports-server with Apache License 2.0 4 votes vote down vote up
private void changeDemoSettings() throws RepositoryException {
	
	// change demo database path (depends on installation selection)
	String path = StorageConstants.DATASOURCES_ROOT ;		
       String statement = "/jcr:root" + ISO9075.encodePath(path) + "/demo/Demo";
       QueryResult queryResult = getTemplate().query(statement);
       NodeIterator nodes = queryResult.getNodes();
       LOG.info("Found " + nodes.getSize() + " Demo data source");
       if (nodes.hasNext()) {
       	Node node = nodes.nextNode();
       	String oldUrl = node.getProperty("url").getString();
       	int index = oldUrl.indexOf(";");        	
       	String prefix = "jdbc:derby:";
       	String urlPath = oldUrl.substring(prefix.length(), index);        	
       	String newUrlPath = System.getProperty("nextserver.home") + "/demo/data";        	
       	node.setProperty("url", prefix + newUrlPath + oldUrl.substring(index));  
       	LOG.info("Change Demo old url '" + oldUrl + "' with new url '" + newUrlPath + "'");
       }
       
       // change properties from installer (base url, reports home, http port) in demo data JCR (see StorageUpdate9)
       String settingsPath = StorageConstants.SETTINGS_ROOT ;		
       String settingsStatement = "/jcr:root" + ISO9075.encodePath(settingsPath);
       QueryResult settingsQueryResult = getTemplate().query(settingsStatement);
       NodeIterator settingsNodes = settingsQueryResult.getNodes();
       if (settingsNodes.hasNext()) {
       	Node settingsNode = settingsNodes.nextNode();
       	    
            String baseUrl = NextServerConfiguration.get().getConfiguration().getString("nextserver.baseUrl", "http://localhost:8081");
            settingsNode.setProperty(StorageConstants.BASE_URL,  baseUrl);
            LOG.info("Set Base Url : " + baseUrl);
                           
            String home;
            // reports.home property can be found only in property file till version 4.2
            if (NextServerConfiguration.get().getConfiguration().containsKey("reports.home")) {
            	home = NextServerConfiguration.get().getConfiguration().getString("reports.home", "./reports");
            } else {
            	// if not found we use installer property        	
            	home = NextServerConfiguration.get().getConfiguration().getString("nextserver.home", ".") + "/reports";
            }
            settingsNode.setProperty(StorageConstants.REPORTS_HOME,  home);
            LOG.info("Set Reports Home : " + home);
                            
            // http port modified in installer
            boolean httpModified = !baseUrl.contains("8081");
            String reportsUrl;
            if (httpModified) {
            	reportsUrl = baseUrl + "/reports";
            } else {
            	reportsUrl = NextServerConfiguration.get().getConfiguration().getString("reports.url", "http://localhost:8081/reports");
            }
            settingsNode.setProperty(StorageConstants.REPORTS_URL, reportsUrl);
            LOG.info("Set Reports Url : " + reportsUrl);
       }
       
       getTemplate().save();
	
}