/** * A mixin to record when the attached element was last modified. * * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */ @MixinType(name = "wsrp:lastmodified") public abstract class LastModified implements BaseMixin { @Property(name = "wsrp:time") public abstract long getLastModified(); public abstract void setLastModified(long lastModified); public void initializeValue() { setLastModified(SupportsLastModified.now()); } }
protected final String getNodeTypeName(Class<?> clazz) { PrimaryType primaryType = clazz.getAnnotation(PrimaryType.class); if (primaryType != null) { return primaryType.name(); } else { MixinType mixinType = clazz.getAnnotation(MixinType.class); if (mixinType != null) { return mixinType.name(); } } return null; }
MixinType typeAnnotation = (MixinType)mappingAnnotation; nodeTypeKind = NodeTypeKind.MIXIN; nodeTypeName = typeAnnotation.name(); orderable = false; abstract_ = true;
/** * A mixin to record whether the attached consumer needs to call modifyRegistration. * * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */ @MixinType(name = "wsrp:modifyregistrationrequired") public abstract class ModifyRegistrationRequired implements BaseMixin { @Property(name = "wsrp:ismodifyregistrationrequired") @DefaultValue("false") public abstract boolean isModifyRegistrationRequired(); public abstract void setModifyRegistrationRequired(boolean modifyRegistrationRequired); public void initializeValue() { setModifyRegistrationRequired(false); } }
/** * A mixin to record whether WS-Security is enabled for a consumer. * * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a> * @version $Revision$ */ @MixinType(name = "wsrp:wssendpointinfo") public abstract class WSSEndpointEnabled implements BaseMixin { @Property(name = "enablewss") @DefaultValue("false") public abstract boolean getWSSEnabled(); public abstract void setWSSEnabled(boolean enable); public void initializeValue() { //set to false by default setWSSEnabled(false); } }
@MixinType(name = "mop:templatized") public abstract class TemplatizedImpl implements Templatized
/** * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> * @version $Revision$ */ @MixinType(name = "session:b") public class B { }
/** * @author Julien Viet */ @MixinType(name = "inheritance:m2") public class M2 extends M1 { }
/** * @author Julien Viet */ @MixinType(name = "inheritance:m1") public class M1 { }
/** * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> * @version $Revision$ */ @MixinType(name = "b2") public abstract class B2 { @Property(name = "foo") public abstract String getFoo(); }
/** * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> * @version $Revision$ */ @MixinType(name = "onetoone_e:c") public abstract class C { @OneToOne(type = RelationshipType.EMBEDDED) abstract B getEntity(); abstract void setEntity(B b); @Property(name = "foo") public abstract void setFoo(String foo); public abstract String getFoo(); @OneToOne @Owner @MappedBy("b") public abstract B getB(); public abstract void setB(B b); }