weaver      2003/10/17 12:40:07

  Modified:    portal/src/java/org/apache/jetspeed/om/impl
                        DescriptionImpl.java
  Log:
  - Added additional convenience methods
  - Defaults to Jetspeed's default Locale
  
  Revision  Changes    Path
  1.2       +24 -2     
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/om/impl/DescriptionImpl.java
  
  Index: DescriptionImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/om/impl/DescriptionImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DescriptionImpl.java      10 Oct 2003 05:12:09 -0000      1.1
  +++ DescriptionImpl.java      17 Oct 2003 19:40:07 -0000      1.2
  @@ -55,6 +55,7 @@
   
   import java.util.Locale;
   
  +import org.apache.jetspeed.Jetspeed;
   import org.apache.jetspeed.om.common.MutableDescription;
   
   /**
  @@ -79,13 +80,15 @@
       /**
        * Links this description to the object that it describes
        */
  -  //  protected long objectId;
  +    //  protected long objectId;
   
       // private long id;
   
       public DescriptionImpl()
       {
           super();
  +        // always init to default locale
  +        locale = Jetspeed.getDefaultLocale();
       }
   
       public DescriptionImpl(Locale locale, String description, String type)
  @@ -130,12 +133,31 @@
           return locale;
       }
   
  +    public void setLanguage(String lang)
  +    {
  +        this.locale = new Locale(lang);
  +    }
  +
       /**
        * @return
        */
       public String getType()
       {
           return type;
  +    }
  +
  +    /** 
  +     * <p>
  +     * setType
  +     * </p>
  +     * 
  +     * @see 
org.apache.jetspeed.om.common.MutableDescription#setType(java.lang.String)
  +     * @param type
  +     * @return
  +     */
  +    public void setType(String type)
  +    {        
  +        this.type = type;
       }
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to