All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.oodt.cas.filemgr.validation.ValidationLayer Maven / Gradle / Ivy

Go to download

The file management component of a Catalog and Archive Service. This component purposefully separates data stores and metadata stores as standard interfaces, and provides some out of the box backend implementations of them (including one based on the javax.sql.DataSource interface). This component provides everything that you need to catalog, archive and manage files, and directories, and their associated metadata.

There is a newer version: 1.9.1
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.oodt.cas.filemgr.validation;

//OODT imports
import org.apache.oodt.cas.filemgr.structs.Element;
import org.apache.oodt.cas.filemgr.structs.ProductType;
import org.apache.oodt.cas.filemgr.structs.exceptions.ValidationLayerException;

//JDK imports
import java.util.List;

/**
 * @author mattmann
 * @author bfoster
 * @version $Revision$
 * 
 * 

* The Validation Layer for the File Manager, allowing {@link Element}s to be * mapped to {@link ProductType}s. *

* */ public interface ValidationLayer { /** *

* Adds the Element to the ValidationLayer. *

* * @param element * The element to add. * @throws ValidationLayerException * If any error occurs during the add. */ public void addElement(Element element) throws ValidationLayerException; /** *

* Modifies an existing {@link Element} in the ValidationLayer. *

* * @param element * The new {@link Element} data to update. * @throws ValidationLayerException * If any error occurs. */ public void modifyElement(Element element) throws ValidationLayerException; /** *

* Removes a metadata {@link Element} from the ValidationLayer. * * @param element * The element to remove. * @throws ValidationLayerException * If any error occurs. */ public void removeElement(Element element) throws ValidationLayerException; /** *

* Adds the specified element to the {@link ProductType} * specified by its productTypeId. * * @param type * The {@link ProductType} to associate the metadata Element * with. * @param element * The {@link Element} to associate with the ProductType. * @throws ValidationLayerException * If any error occurs. */ public void addElementToProductType(ProductType type, Element element) throws ValidationLayerException; /** *

* Removes a metadata {@link Element} from the specified * productTypeId. *

* * @param type * The {@link ProductType} to remove the association of the * specified element with. * @param element * The element whose association will be removed from the * specified ProductType. * @throws ValidationLayerException * If any error occurs. */ public void removeElementFromProductType(ProductType type, Element element) throws ValidationLayerException; /** *

* Returns a {@link List} of {@link Element}s corresponding to the given * ProductType. * * @param type * The product type to retrieve the metadata {@link Element}s * for. * @return A {@link List} of {@link Element}s corresponding to the given * ProductType. * @throws ValidationLayerException * If any error occurs. */ public List getElements(ProductType type) throws ValidationLayerException; /** * @return A {@link List} of all the metadata {@link Element}s in the * ValidationLayer. * @throws ValidationLayerException * If any error occurs. */ public List getElements() throws ValidationLayerException; /** * Gets an element by its String identifier. * * @param elementId * The String identifier of the {@link Element} to get. * @return An {@link Element} by its String identifier. * @throws ValidationLayerException * If any error occurs. */ public Element getElementById(String elementId) throws ValidationLayerException; /** * Gets an element by its String name. * * @param elementName * The String name of the {@link Element} to get. * @return An {@link Element} by its String name. * @throws ValidationLayerException * If any error occurs. */ public Element getElementByName(String elementName) throws ValidationLayerException; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy