FileDocCategorySizeDatePackage
LifetimeImpl.javaAPI DocExample4554Tue May 29 16:57:00 BST 2007com.sun.xml.ws.security.trust.impl.elements

LifetimeImpl

public class LifetimeImpl extends com.sun.xml.ws.security.trust.impl.bindings.LifetimeType implements com.sun.xml.ws.security.trust.elements.Lifetime
author
Manveen Kaur

Fields Summary
private static final Logger
log
Constructors Summary
public LifetimeImpl()

    
      
        // default empty constructor
    
public LifetimeImpl(com.sun.xml.ws.security.wsu10.AttributedDateTime created, com.sun.xml.ws.security.wsu10.AttributedDateTime expires)

        if (created != null) {
            setCreated(created);
        }
        if (expires !=null) {
            setExpires(expires);
        }
    
public LifetimeImpl(com.sun.xml.ws.security.trust.impl.bindings.LifetimeType ltType)

        this(ltType.getCreated(), ltType.getExpires());
    
Methods Summary
public static com.sun.xml.ws.security.trust.impl.bindings.LifetimeTypefromElement(org.w3c.dom.Element element)
Constructs a Lifetime element from an existing XML block.

param
lifetimeElement A org.w3c.dom.Element representing DOM tree for Lifetime object.
exception
WSTrustException if it could not process the org.w3c.dom.Element properly, implying that there is an error in the sender or in the element definition.

        try {
            final javax.xml.bind.Unmarshaller unmarshaller = WSTrustElementFactory.getContext().createUnmarshaller();
            return (LifetimeType)unmarshaller.unmarshal(element);
        } catch ( JAXBException ex) {
            log.log(Level.SEVERE,
                    LogStringsMessages.WST_0021_ERROR_UNMARSHAL_DOM_ELEMENT());
            throw new WSTrustException(LogStringsMessages.WST_0021_ERROR_UNMARSHAL_DOM_ELEMENT(), ex);
        }