01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.desktop.dp;
06:
07: /**
08: * Fully qualified channel name
09: */
10: public class FQCN {
11: private String channelID;
12: private String encodedChannelID;
13:
14: public FQCN(String channelID) {
15: this .channelID = channelID;
16: }
17:
18: public String plain() {
19: return channelID;
20: }
21:
22: private static final String COMMA = ",";
23: private static final String DOUBLE_HASH = "##";
24: private static final String EQUAL_TO = "=";
25: private static final String TRIPLE_HASH = "###";
26:
27: public String encoded() {
28: if (encodedChannelID == null) {
29: encodedChannelID = channelID.replaceAll(EQUAL_TO,
30: DOUBLE_HASH);
31: encodedChannelID = encodedChannelID.replaceAll(COMMA,
32: TRIPLE_HASH);
33: }
34:
35: return encodedChannelID;
36: }
37: }
|