156ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson/*
256ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * Copyright (C) 2010 Google Inc.
356ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson *
456ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * Licensed under the Apache License, Version 2.0 (the "License");
556ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * you may not use this file except in compliance with the License.
656ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * You may obtain a copy of the License at
756ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson *
856ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * http://www.apache.org/licenses/LICENSE-2.0
956ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson *
1056ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * Unless required by applicable law or agreed to in writing, software
1156ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * distributed under the License is distributed on an "AS IS" BASIS,
1256ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1356ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * See the License for the specific language governing permissions and
1456ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * limitations under the License.
1556ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson */
1656ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson
1756ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodsonpackage org.clearsilver;
1856ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson
1956ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodsonimport java.io.IOException;
2056ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson
2156ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson/**
2256ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson * Interface for CS file hook
2356ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson */
2456ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodsonpublic interface CSFileLoader {
2556ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson
2656ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson  /**
2756ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson   * Callback method that is expected to return the contents of the specified
2856ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson   * file as a string.
2956ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson   * @param hdf the HDF structure associated with HDF or CS object making the
3056ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson   * callback.
3156ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson   * @param filename the name of the file that should be loaded.
3256ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson   * @return a string containing the contents of the file.
3356ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson   */
3456ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson  public String load(HDF hdf, String filename) throws IOException;
3556ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson
3656ed4167b942ec265f9cee70ac4d71d10b3835ceBen Dodson}
37