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.wra;
17
18 import com.fatwire.assetapi.data.AssetId;
19
20 /**
21 * Dao for dealing with core fields in an alias. Aliases may override fields in
22 * their target WRA if it points to another asset. Aliases may also refer to
23 * external URLs.
24 *
25 * @author Tony Field
26 * @since Jul 21, 2010
27 */
28 public interface AliasCoreFieldDao {
29
30 /**
31 * Method to test whether or not an asset is an Alias. todo: low priority:
32 * optimize as this will be called at runtime
33 *
34 * @param id asset ID to check
35 * @return true if the asset is a valid Alias asset, false if it is not
36 */
37 public boolean isAlias(AssetId id);
38
39 /**
40 * Return an alias asset bean given an input id. Required fields must be set
41 * or an exception is thrown.
42 *
43 * @param id asset id
44 * @return Alias
45 * @see #isAlias
46 */
47 public Alias getAlias(AssetId id);
48
49 }