Class BeanTranslation

    • Constructor Detail

      • BeanTranslation

        protected BeanTranslation()
        Constructs an empty translation.
      • BeanTranslation

        protected BeanTranslation​(BeanTranslation translation)
        Constructs a new translation of a bean by copying the specified one. Only the identifier isn't copied as it should be unique.
        Parameters:
        translation - the bean translation to copy.
      • BeanTranslation

        protected BeanTranslation​(String lang,
                                  String name,
                                  String description)
    • Method Detail

      • getId

        public final String getId()
        Description copied from interface: Identifiable
        Gets the unique identifier of the object in Silverpeas. If he's also identified by a local identifier, then this method should return the one global to Silverpeas.
        Specified by:
        getId in interface Identifiable
        Returns:
        the identifier encoded as a String. If the identifier is a complex one, that is made up of several identification parts, then the returned representation should take care of such a structure.
      • setId

        public final void setId​(String id)
      • getLanguage

        public final String getLanguage()
        Description copied from interface: Translation
        Gets the language in which is this translation.
        Specified by:
        getLanguage in interface Translation
        Returns:
        the ISO 639-1 code of the language.
      • setLanguage

        public final void setLanguage​(String language)
      • getObjectId

        public String getObjectId()
      • setObjectId

        public void setObjectId​(String objectId)
      • getName

        public final String getName()
        Description copied from interface: ResourceTranslation
        Gets the name of the resource in the underlying language.
        Specified by:
        getName in interface ResourceTranslation
        Returns:
        the localized name or title of the resource.
      • setName

        public final void setName​(String name)
      • getDescription

        public final String getDescription()
        Description copied from interface: ResourceTranslation
        Gets the description about the resource in the underlying language.
        Specified by:
        getDescription in interface ResourceTranslation
        Returns:
        a localized short description about the resource.
      • setDescription

        public final void setDescription​(String description)
      • copy

        protected <T extends BeanTranslation> T copy()
        Copies this bean into another one. This method expects the classes extending the BeanTranslation class having a public or a protected default constructor, otherwise a SilverpeasRuntimeException exception is thrown. The difference between this copy method with the copy constructor is that it can be used against any child of the BeanTranslation class without explicitly having a copy constructor or overriding this method.
        Returns:
        a copy of this bean.