Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
PersistentPropertyDataEncoder |
|
| 1.0;1 |
1 | // Copyright 2005 The Apache Software Foundation |
|
2 | // |
|
3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
|
4 | // you may not use this file except in compliance with the License. |
|
5 | // You may obtain a copy of the License at |
|
6 | // |
|
7 | // http://www.apache.org/licenses/LICENSE-2.0 |
|
8 | // |
|
9 | // Unless required by applicable law or agreed to in writing, software |
|
10 | // distributed under the License is distributed on an "AS IS" BASIS, |
|
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
12 | // See the License for the specific language governing permissions and |
|
13 | // limitations under the License. |
|
14 | ||
15 | package org.apache.tapestry.record; |
|
16 | ||
17 | import java.util.List; |
|
18 | ||
19 | /** |
|
20 | * Responsible for encoding {@link org.apache.tapestry.record.PropertyChange}s |
|
21 | * into and out of plain strings. |
|
22 | * |
|
23 | * @author Howard M. Lewis Ship |
|
24 | * @since 4.0 |
|
25 | */ |
|
26 | public interface PersistentPropertyDataEncoder |
|
27 | { |
|
28 | ||
29 | /** |
|
30 | * Encodes a (possibly empty) list of {@link PropertyChange}s into a string |
|
31 | * representation that can later be decoded. |
|
32 | * |
|
33 | * @param changes |
|
34 | * List of changes to encode into a persistable form. |
|
35 | * |
|
36 | * @return encoded string (possibly empty, but not null) |
|
37 | */ |
|
38 | String encodePageChanges(List changes); |
|
39 | ||
40 | /** |
|
41 | * Takes a string with an encoded set of page changes, and converts it back |
|
42 | * into a list of {@link org.apache.tapestry.record.PropertyChange}s. |
|
43 | * |
|
44 | * @param encoded |
|
45 | * The data to un-encode, which should be equivalent to the same that |
|
46 | * was passed in to {@link #encodePageChanges(java.util.List)}. |
|
47 | * |
|
48 | * @return The decoded page data. |
|
49 | */ |
|
50 | ||
51 | List decodePageChanges(String encoded); |
|
52 | ||
53 | } |