Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * #%L
   * Wikitty :: api
   * %%
   * Copyright (C) 2009 - 2010 CodeLutin, Benjamin Poussin
   * %%
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Lesser General Public License as 
   * published by the Free Software Foundation, either version 3 of the 
  * License, or (at your option) any later version.
  * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Lesser Public License for more details.
  * 
  * You should have received a copy of the GNU General Lesser Public 
  * License along with this program.  If not, see
  * <http://www.gnu.org/licenses/lgpl-3.0.html>.
  * #L%
  */
 
 package org.nuiton.wikitty.storage;
 
 import java.util.List;

Author(s):
poussin
Version:
$Revision$ Last update: $Date$ by : $Author$
 
 public interface WikittyExtensionStorage {

    
Store extension in storage.

Parameters:
transaction the current transaction
extensions the extensions to store
Returns:
information usefull for client side update data
 
     WikittyEvent store(WikittyTransaction transaction,
             Collection<WikittyExtensionextensions);

    
delete extensions

Parameters:
transaction transaction
extNames extension name (extName)
 
     public WikittyEvent delete(
             WikittyTransaction transactionCollection<StringextNames);

    
Return true if id exists in storage.

Parameters:
transaction the current transaction
id an extension id
Returns:
true if the extension exists
 
     boolean exists(WikittyTransaction transactionString id);

    
Return all extension ids.

Parameters:
transaction the current transaction
Returns:
a list of extension ids
 
     List<StringgetAllExtensionIds(WikittyTransaction transaction);

    
Return all extension ids where the specified extensionName is required.

Parameters:
transaction the current transaction
extensionName the extension required
Returns:
a list of extension ids
 
             String extensionName);
    
    
return last version available for specified extension name.

Parameters:
transaction the current transaction
extName name of extension
Returns:
last version availble for this version, or null if extension doesn't exist
 
     String getLastVersion(WikittyTransaction transactionString extName);

    
Restore one extension from storage, if not found an exception is thrown.

Parameters:
transaction the current transaction
name extension name to restore
version extension version to restore
Returns:
an extension
Throws:
org.nuiton.wikitty.WikittyException if exception during restore
    WikittyExtension restore(WikittyTransaction transactionString nameString version)
            throws WikittyException;

    
Remove all extensions.

Parameters:
transaction transaction
    public WikittyEvent clear(WikittyTransaction transaction);
    
New to GrepCode? Check out our FAQ X