View Javadoc

1   /*
2    * Copyright 2000-2004 The Apache Software Foundation.
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  
17  package org.apache.jetspeed.services.webpage;
18  
19  /* 
20   * Holds the state of a proxied target. This simple implementation is unsecured.
21   *
22   */
23  public class UnsecuredSite
24  {    
25      private long id;
26      private String url;
27      private String name;
28      private int status;
29   
30      /*
31       * Construct a site object given a unique id and ip address.
32       *
33       * @param sid the unique network element identifier.
34       * @param ip the ip address of the network element.
35       *
36       */
37      public UnsecuredSite(String name, 
38                           String url)
39  
40      {
41          this.id = WebPageHelper.generateId();
42          this.name = name;
43          this.url = url;        
44      }
45  
46      /* 
47       * Get the unique ID of the proxied target.
48       *
49       * return The unique ID of the target.
50       */
51      public long getID()
52      {
53          return this.id;
54      }
55  
56      /* 
57       * Get the URL of the proxied target.
58       *
59       * return The URL of the proxied target.
60       */
61      public String getURL()
62      {
63          return this.url;
64      }
65   
66      
67      /* 
68       * get the common name for this proxied target.
69       *
70       * return the string value of the proxied target name.
71       */
72      public String getName()
73      {
74          return this.name;
75      }
76  
77      /* 
78       * get the user name used to logon to this proxied target.
79       *
80       * return the string value of the proxied target user name.
81       */
82      public String getUserName()
83      {
84          return null;
85      }
86          
87      /* 
88       * get the password used to logon to this proxied target.
89       *
90       * return the string value of the proxied target password.
91       */
92      public String getPassword()
93      {
94          return null;
95      }
96       
97      /* 
98       * get the availability status of this proxied target.
99       *
100      * return the int value of the proxied target availability status.
101      */
102     public int getStatus()
103     {
104         return this.status;
105     }
106     
107     /* 
108      * sets the status of this proxied target.
109      *
110      * @param the int value of the proxied target status.
111      */
112     public void setStatus(int status)
113     {
114         this.status = status;
115     }
116     
117     /* 
118      * Is this proxied target secured.
119      *
120      * return True if the target is secured.
121      */
122     public boolean isSecured()
123     {
124         return false;
125     }
126 
127 }