org.jboss.system.server.profileservice.attachments
Class LazyPredeterminedManagedObjects

java.lang.Object
  extended by org.jboss.system.server.profileservice.attachments.LazyPredeterminedManagedObjects
All Implemented Interfaces:
Serializable, org.jboss.deployers.spi.attachments.Attachments, org.jboss.deployers.spi.attachments.MutableAttachments

public class LazyPredeterminedManagedObjects
extends Object
implements org.jboss.deployers.spi.attachments.MutableAttachments

Basic wrapper for MutableAttachmets. This maintains a list of associated metadata, which is loaded on demand.

Version:
$Revision: 88716 $
Author:
Emanuel Muckenhuber
See Also:
Serialized Form

Constructor Summary
LazyPredeterminedManagedObjects(AbstractFileAttachmentsSerializer serializer, String relativePath, Collection<String> attachments)
           
 
Method Summary
<T> T
addAttachment(Class<T> type, T attachment)
           
 Object addAttachment(String name, Object attachment)
           
<T> T
addAttachment(String name, T attachment, Class<T> expectedType)
           
 void clear()
           
 void clearChangeCount()
           
<T> T
getAttachment(Class<T> type)
           
 Object getAttachment(String name)
           
<T> T
getAttachment(String name, Class<T> expectedType)
           
 Map<String,Object> getAttachments()
           
 int getChangeCount()
           
 boolean hasAttachments()
           
 boolean isAttachmentPresent(Class<?> type)
           
 boolean isAttachmentPresent(String name)
           
 boolean isAttachmentPresent(String name, Class<?> expectedType)
           
<T> T
removeAttachment(Class<T> type)
           
 Object removeAttachment(String name)
           
<T> T
removeAttachment(String name, Class<T> expectedType)
           
 void setAttachments(Map<String,Object> map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyPredeterminedManagedObjects

public LazyPredeterminedManagedObjects(AbstractFileAttachmentsSerializer serializer,
                                       String relativePath,
                                       Collection<String> attachments)
Method Detail

addAttachment

public Object addAttachment(String name,
                            Object attachment)
Specified by:
addAttachment in interface org.jboss.deployers.spi.attachments.MutableAttachments

addAttachment

public <T> T addAttachment(Class<T> type,
                           T attachment)
Specified by:
addAttachment in interface org.jboss.deployers.spi.attachments.MutableAttachments

addAttachment

public <T> T addAttachment(String name,
                           T attachment,
                           Class<T> expectedType)
Specified by:
addAttachment in interface org.jboss.deployers.spi.attachments.MutableAttachments

clear

public void clear()
Specified by:
clear in interface org.jboss.deployers.spi.attachments.MutableAttachments

clearChangeCount

public void clearChangeCount()
Specified by:
clearChangeCount in interface org.jboss.deployers.spi.attachments.MutableAttachments

getChangeCount

public int getChangeCount()
Specified by:
getChangeCount in interface org.jboss.deployers.spi.attachments.MutableAttachments

removeAttachment

public Object removeAttachment(String name)
Specified by:
removeAttachment in interface org.jboss.deployers.spi.attachments.MutableAttachments

removeAttachment

public <T> T removeAttachment(Class<T> type)
Specified by:
removeAttachment in interface org.jboss.deployers.spi.attachments.MutableAttachments

removeAttachment

public <T> T removeAttachment(String name,
                              Class<T> expectedType)
Specified by:
removeAttachment in interface org.jboss.deployers.spi.attachments.MutableAttachments

setAttachments

public void setAttachments(Map<String,Object> map)
Specified by:
setAttachments in interface org.jboss.deployers.spi.attachments.MutableAttachments

getAttachment

public Object getAttachment(String name)
Specified by:
getAttachment in interface org.jboss.deployers.spi.attachments.Attachments

getAttachment

public <T> T getAttachment(Class<T> type)
Specified by:
getAttachment in interface org.jboss.deployers.spi.attachments.Attachments

getAttachment

public <T> T getAttachment(String name,
                           Class<T> expectedType)
Specified by:
getAttachment in interface org.jboss.deployers.spi.attachments.Attachments

getAttachments

public Map<String,Object> getAttachments()
Specified by:
getAttachments in interface org.jboss.deployers.spi.attachments.Attachments

hasAttachments

public boolean hasAttachments()
Specified by:
hasAttachments in interface org.jboss.deployers.spi.attachments.Attachments

isAttachmentPresent

public boolean isAttachmentPresent(String name)
Specified by:
isAttachmentPresent in interface org.jboss.deployers.spi.attachments.Attachments

isAttachmentPresent

public boolean isAttachmentPresent(Class<?> type)
Specified by:
isAttachmentPresent in interface org.jboss.deployers.spi.attachments.Attachments

isAttachmentPresent

public boolean isAttachmentPresent(String name,
                                   Class<?> expectedType)
Specified by:
isAttachmentPresent in interface org.jboss.deployers.spi.attachments.Attachments


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.