1 /*
2 * Copyright 2010 FatWire Corporation. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package com.fatwire.gst.foundation.url;
17
18 import com.fatwire.assetapi.data.AssetId;
19 import com.fatwire.gst.foundation.controller.AssetIdWithSite;
20
21 /**
22 * Path translation service for going from assetid to WRA path and back
23 * <p/>
24 * todo: low priority: for any given partial url, get next children down, and
25 * "are they parents too" TODO: low priority: remove asset listener methods from
26 * interface, create separate interface for these methods
27 *
28 * @author Tony Field
29 * @author Dolf Dijkstra
30 * @since Jul 21, 2010
31 */
32 public interface WraPathTranslationService {
33
34 /**
35 * Look up the asset corresponding to the input virtual-webroot and url-path
36 *
37 * @param virtual_webroot
38 * @param url_path
39 * @return asset id and site
40 */
41 AssetIdWithSite resolveAsset(final String virtual_webroot, final String url_path);
42
43 void addAsset(AssetId id);
44
45 void updateAsset(AssetId id);
46
47 void deleteAsset(AssetId id);
48
49 }