Class Metadata


  • public class Metadata
    extends Object
    Simple data struct for common metadata. Used to keep the method signatures small and tidy.
    • Method Detail

      • empty

        public static Metadata empty()
      • staticDescription

        public static Metadata staticDescription​(com.google.gwt.resources.client.TextResource description)
      • staticDescription

        public static Metadata staticDescription​(ResourceDescription description)
        Constructs a Metadata with read-write-execution permissions and a non-working Capabilities object.
      • staticDescription

        public static Metadata staticDescription​(ResourceDescription description,
                                                 Environment environment)
        Constructs a Metadata with read-write-execution permissions and a working Capabilities object based on the environment object.
      • copyAttribute

        public void copyAttribute​(String attribute,
                                  Metadata destination)
        Copies attributes from this description to the specified metadata
      • makeWritable

        public void makeWritable​(String attribute)
        Makes the specified attribute writable. This is necessary if you copy attributes from a complex attribute to another metadata. Without adjustment the copied attributes are read-only in the destination metadata.
      • forComplexAttribute

        public Metadata forComplexAttribute​(String name)
        Creates a new metadata instance based on this metadata with the attributes taken from the specified complex attribute. The resource description will only include the attributes but no operations!
      • forComplexAttribute

        public Metadata forComplexAttribute​(String name,
                                            boolean prefixLabel)
        Creates a new metadata instance based on this metadata with the attributes taken from the specified complex attribute. The resource description will only include the attributes but no operations!
        Parameters:
        prefixLabel - if true the labels of the attributes of the complex attribute are prefixed with name of the complex attribute.
      • getTemplate

        public AddressTemplate getTemplate()
        Returns:
        the address template
      • getSecurityContext

        public SecurityContext getSecurityContext()
        Returns:
        the security context
      • getDescription

        public ResourceDescription getDescription()
        Returns:
        the resource description